Skip to content

Commit

Permalink
Un-vendor the fastentrypoints dependency.
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
Dominik Gresch committed Jun 29, 2020
1 parent 43104e3 commit 6f08bc9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 116 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include aiida/cmdline/templates/*.tpl
include aiida/manage/backup/backup_info.json.tmpl
include utils/fastentrypoints.py
include setup.json
include AUTHORS.txt
include CHANGELOG.md
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
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__"
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
import os
import sys

from utils import fastentrypoints # pylint: disable=unused-import
try:
import fastentrypoints # pylint: disable=unused-import
except ImportError:
# This should only occur when building the package, i.e. when
# executing 'python setup.py sdist' or 'python setup.py bdist_wheel'
pass
from setuptools import setup, find_packages

if (sys.version_info.major, sys.version_info.minor) == (3, 5):
Expand Down
3 changes: 2 additions & 1 deletion utils/dependency_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ def generate_pyproject_toml():

pyproject = {
'build-system': {
'requires': ['setuptools>=40.8.0', 'wheel', str(reentry_requirement)],
'requires': ['setuptools>=40.8.0', 'wheel',
str(reentry_requirement), 'fastentrypoints~=0.12'],
'build-backend': 'setuptools.build_meta:__legacy__',
}
}
Expand Down
112 changes: 0 additions & 112 deletions utils/fastentrypoints.py

This file was deleted.

0 comments on commit 6f08bc9

Please sign in to comment.