-
Notifications
You must be signed in to change notification settings - Fork 214
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
Limit find_packages
in setup.py to aiida (sub-)packages.
#4204
Conversation
The setuptools.find_packages function finds all packages in the current directory. This means that `docs`, `tests`, and `utils` are currently installed when running ```bash python setup.py sdist pip install dist/aiida-core-<version>.tar.gz ``` To avoid this, we use the `include` keyword to only find `aiida` and its sub-packages.
Codecov Report
@@ Coverage Diff @@
## develop #4204 +/- ##
========================================
Coverage 79.03% 79.03%
========================================
Files 467 467
Lines 34492 34492
========================================
Hits 27259 27259
Misses 7233 7233
Continue to review full report at Codecov.
|
I certainly approve this change but I'm not sure what currently the policy is with the release/1.3.0 branch, so let's wait for @sphuber with merging |
Remove the following files from the distribution, by removing them from MANIFEST.in: - `*.aiida` export files, used for testing - `*.png` files from the `docs` directory - files in `utils`, with the exception of `fasentrypoints.py` which is used in the install process.
f953ffc
to
43104e3
Compare
The `fastentrypoints` dependency is used to make console scripts faster, in the case where they are **not** installed as wheels. If they are installed as wheels, the console scripts are faster by default. By specifying `fastentrypoints` as a build requirement in `pyproject.toml`, we can ensure that it can be imported whenever the package is installed through `pip`. This incurs a slight overhead of having to install `fastentrypoints` even when the package is installed as a wheel, but we no longer have to vendor `fastentrypoints`.
21afe94
to
6f08bc9
Compare
@csadorf please review the change to |
Use an absolute link to aiida.net for the logo in the README, instead of a relative link. This is needed to make the image work on PyPI. Remove the now-unused logo file docs/source/logo_aiida_main.png.
ca11efb
to
fe9323e
Compare
You may now also be able to remove this: aiida-core/open_source_licenses.txt Lines 332 to 360 in 9a32cec
|
Since we no longer vendor the `fastentrypoints` code, it can be removed from the `open_source_licenses.txt` file.
@csadorf did you still want to have a look at the change of the |
Yes, reviewing now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving changes to utils/dependency_management.py
.
@greschd Any hints as to how we could make that process less confusing? Provide a visible warning during the precommit rewrite or so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @greschd
@csadorf ideal would be a comment in Since long-term the goal is (probably?) to consolidate configuration of tools like Of course another option would be just validating the file without auto-fixing, but that's obviously not quite as nice. |
By the way, I checked this branch on Test PyPI before merging, and everything worked. The logo in the readme worked and the generated script wrapper for |
@greshd I think auto-generating it every time in this way might have been a poor work-around to ensure its consistency. I will try to improve that next time I have to update that function. |
Fixes #4205
The setuptools.find_packages function finds all packages in the
current directory. This means that
docs
,tests
, andutils
are currently installed when running
To avoid this, we use the
include
keyword to only findaiida
and its sub-packages.