-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to the setup procedure for building and installing the package (
#4204) Overview of the changes in this commit: * Limit `find_packages` in `setup.py` to only the `aiida` package * Unvendor the `fastentrypoints` dependency * Remove files from the `MANIFEST.in` The `setup.py` uses the `setuptools.find_packages` function to determine all packages that need to be included automatically. Since we don't specify any rules, it finds all packages in the current directory. This means that `docs`, `tests`, and `utils` are currently also installed. To avoid this, we use the `include` keyword to only find `aiida` package and all of its sub-packages. We have been using the `fastentrypoints` dependency as a hack to ensure that console scripts that are installed through entry points, such as `verdi` in our case, have a fast start up time. This is critical for tab-completion. The reason this hack is necessary is because setuptools, which creates the wrapper script, uses `pkg_resources` by default, which is really slow and adds 200 ms of overhead. The `fastentrypoints` monkey patches `setuptools` to generate a faster wrapper script. Note that none of this applies if the package is installed through a wheel. For this reason we have been vendoring `fastentrypoints` but we now move it to a build requirement in `pyproject.toml`, which ensures 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 it. Finally, we remove the following files from the distribution by removing them from the manifest: * The `*.aiida` export files which had already been moved to `tests/` * The `script.py.mako` which is only needed for devs to create migration files for the SqlAlchemy backend * The `*.png` files from the `docs` directory * The files in `utils` which are only necessary for developers In addition to removing the images from the `docs/` we change the readme to use a permalink for the AiiDA logo from the website instead of the relative path to the docs, such that the logo also displays correctly on, among others, PyPI.
- Loading branch information
Showing
8 changed files
with
11 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[build-system] | ||
requires = [ "setuptools>=40.8.0", "wheel", "reentry~=1.3",] | ||
requires = [ "setuptools>=40.8.0", "wheel", "reentry~=1.3", "fastentrypoints~=0.12",] | ||
build-backend = "setuptools.build_meta:__legacy__" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.