Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove tests from package distribution #1779

Conversation

mjurbanski-reef
Copy link
Contributor

Bug

After pip install bittensor site-packages include:

.venv/lib/python3.11/site-packages/bittensor/*
.venv/lib/python3.11/site-packages/tests/helpers/*
.venv/lib/python3.11/site-packages/tests/integration_tests/*
.venv/lib/python3.11/site-packages/tests/unit_tests/*

i.e. tests are packaged as top-level package and may very well conflict with other python libs that made the same mistake.

Description of the Change

  • exclude tests from setuptools autodiscovery

Alternate Designs

None.
Although at some point deprecated setup.py should be dropped in favor of pdm or more modern packaging tooling, the same error could be done with it as well.

Possible Drawbacks

None I know of.
If someone wants tests, then they need test dependencies as well.

Verification Process

# cleaned previous builds; without this some stuff can still be included even after the fix
python setup.py clean --all
rm -rf build dist *.egg-info

python setup.py bdist_wheel
python setup.py sdist
# examined output if tests/ are still added to .whl and tar

# tested `pip install ./dist/*.whl` and same with sdist to check if installation still works and `btcli` launches

Release Notes

  • Removed accidentally included tests package from Python dist package (i.e. PyPI package)

@mjurbanski-reef mjurbanski-reef changed the title remove tests and pyc from package distribution remove tests from package distribution Apr 10, 2024
@gus-opentensor gus-opentensor merged commit 53175a5 into opentensor:staging Apr 10, 2024
12 checks passed
@gus-opentensor gus-opentensor mentioned this pull request Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants