Skip to content

Conversation

@gsauthof
Copy link
Contributor

The subpackage system_calls.tables is already selected with: packages = ["system_calls"]

Since the build.yaml workflow explicitly installs the built system_calls wheel, there is no need to add the current working directory (CWD) to pytest's pythonpath.

Furthermore, in case a future update breaks the system_calls wheel creation, the pytest invocation will not detect it, because it imports the package from the working directory and not from the installed location.

FWIW, in case you want to explicitly run the tests against the CWD, e.g. during development, you can invoke pytest like this from the CWD:

python3 -m pytest -v

This works because it adds . to the pythonpath, by default, in contrast to the pytest ... frontend.

closes #131

@hrw
Copy link
Owner

hrw commented Oct 28, 2025

So we are back with problem I had. Unless you have ideas for fixing github action workflows as well and can add them into PR.

And be more explicit about included package data:

- make sure that manpage is included in the sdist tar archive
- include tests in sdist archive but not in the wheel
- eliminate deprecation warnings in newer setuptools versions

Since the build.yaml workflow explicitly installs the built system_calls
wheel, there is no need to add the current working directory (CWD) to
pytest's pythonpath.

Furthermore, in case a future update breaks the system_calls wheel
creation, the pytest invocation will not detect it,
because it imports the package from the working directory and
not from the installed location.

FWIW, in case you want to explicitly run the tests against the CWD,
e.g. during development, you can invoke pytest like this from the CWD:

    python3 -m pytest -v

This works because it adds `.` to the pythonpath, by default,
in contrast to the `pytest ...` frontend.

closes hrw#131
@gsauthof
Copy link
Contributor Author

Hm, weird, I tested that change before in a f42 VM where the subpackage was automatically included in the tar archive and wheel:

python -m build 2>/dev/null | grep 'tables/x86\|Building'
* Building sdist...
copying system_calls/tables/x86_64.py -> system_calls-6.17.0/system_calls/tables
* Building wheel from sdist
* Building wheel...
copying system_calls/tables/x86_64.py -> build/lib/system_calls/tables
copying build/lib/system_calls/tables/x86_64.py -> build/bdist.linux-x86_64/wheel/./system_calls/tables
adding 'system_calls/tables/x86_64.py'

From the github actions logs I can see that in the CI environment the subpackage is excluded,
without even issuing a warning.

Python versions are quite similar (3.13.9 vs. 3.13.7), python build has the same version, etc. - perhaps GA setuptools version is weirdly different.


Anyhow, according to the setuptools docs, one should actually specify the subpackage.
And even in my VM I get a deprecation warning when the wheel is created, although it's still included.
(no deprecation warning for the tar though)

I've thus updated the pull request to again explicitly include the subpackage.


The new version also is more explicit about data files:

- make sure that manpage is included in the sdist tar archive
- include tests in sdist archive but not in the wheel
- eliminate deprecation warnings in newer setuptools versions

@hrw
Copy link
Owner

hrw commented Oct 28, 2025

Thanks!

@hrw hrw merged commit 6ab17ea into hrw:master Oct 28, 2025
4 checks passed
@hrw
Copy link
Owner

hrw commented Oct 28, 2025

As usual - this will be released once there will be changes in system-calls data.

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.

Migrate setup.py -> pyproject.toml

2 participants