-
Notifications
You must be signed in to change notification settings - Fork 26
Ensure nisystemlink-clients-python treats systemlink as an implicit namespace package #11
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
Conversation
… tox.ini to pull in required setuptools version
Interestingly, the change to |
It looks like adding a setup_requires causes it to run tox inside of tox. And the internal tox doesn't obey the gh_actions. I dunno why it decides to run tox inside of tox, though. |
It seems to be not the setup_requires, but rather the I suspect this might be a bug with |
…l containing build tooling reqs. Keep the requires, and upgrade setuptools during PR build
When On top of that, the FIRST thing that I ended up adding a pyproject.toml which notates this constraint, so in practice, the generated package will have the proper dependency on |
FYI @DavidCurtiss |
👍 Looks good. |
What does this Pull Request accomplish?
systemlink
is a PEP-420 style namespace package. This mechanism is used by Python-based SystemLink services, allowing the service code to live under thesystemlink
namespace, but exist elsewhere on the module search path, sandboxed outside ofsite-packages
. After installingnisystemlink-clients-python
, an__init__.py
is dropped in thesite-packages
portion of the namespace, causing Python to ignore other packages within the namespace, elsewhere in the search path.As documented:
Why should this Pull Request be merged?
This PR causes the
__init__.py
in thesystemlink
namespace to be omitted from the produced .whl, restoring the PEP-420 behavior.There are numerous issues when using mypy on namespace packages, so the
__init__.py
in thesystemlink
directory is not actually removed as part of this PR. As far as mypy is concerned, this is a regular package. Thesetup.py
is updated to treatsystemlink
as a namespace package, and that__init__.py
is not included in the .whl.What testing has been done?
Manually inspected the generated .whl to ensure that the file was not present. Installed the generated package and verified that other
systemlink
modules elsewhere on the search path were importable. Installed the generated package by itself on a fresh system and verified that it is importable.