From ef2a092358c5e886457a212dfa333d7857b1dbe3 Mon Sep 17 00:00:00 2001 From: Craig Gidney Date: Thu, 12 Sep 2024 17:30:06 -0700 Subject: [PATCH] Fix sinter packaging (#826) - Wasn't including all sub packages in the setup call - Added a CI test that this is correct --- .github/workflows/ci.yml | 21 +++++++++++++++------ glue/sample/setup.py | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 546a735a..3c9e9483 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -183,14 +183,23 @@ jobs: with: name: "dist-stim-sdist" path: dist/*.tar.gz - check_sdist_installs: + check_sdist_installs_stim: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - run: python -m pip install pybind11~=2.11.1 cibuildwheel~=2.16.2 setuptools wheel - - run: python setup.py sdist - - run: pip install dist/*.tar.gz + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - run: python -m pip install pybind11~=2.11.1 cibuildwheel~=2.16.2 setuptools wheel + - run: python setup.py sdist + - run: pip install dist/*.tar.gz + check_sdist_installs_sinter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - run: python -m pip install setuptools + - run: cd glue/sample && python setup.py sdist + - run: pip install glue/sample/dist/* + - run: python -c "import sinter" merge_upload_artifacts: needs: ["build_dist", "build_sdist"] runs-on: ubuntu-latest diff --git a/glue/sample/setup.py b/glue/sample/setup.py index 7fc73a6d..26df217b 100644 --- a/glue/sample/setup.py +++ b/glue/sample/setup.py @@ -27,7 +27,7 @@ author='Craig Gidney', author_email='craig.gidney@gmail.com', license='Apache 2', - packages=['sinter'], + packages=['sinter', 'sinter._data', 'sinter._collection', 'sinter._command', 'sinter._decoding'], package_dir={'': 'src'}, description='Samples stim circuits and decodes them using pymatching.', long_description=long_description,