Skip to content

Commit

Permalink
Remove setuptools_rust from install requirement (#5779)
Browse files Browse the repository at this point in the history
* Remove setuptools_rust from install requirement

setuptools_rust is only required for building cryptography.

Fixes: #5778
Signed-off-by: Christian Heimes <cheimes@redhat.com>

* sdist needs setuptools_rust

Signed-off-by: Christian Heimes <cheimes@redhat.com>
  • Loading branch information
tiran committed Feb 8, 2021
1 parent 13e7e56 commit 048f7c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions setup.py
Expand Up @@ -39,8 +39,11 @@
exec(f.read(), about)


# `setup_requirements` must be kept in sync with `pyproject.toml`
setup_requirements = ["cffi>=1.12", "setuptools-rust>=0.11.4"]
# `install_requirements` and `setup_requirements` must be kept in sync with
# `pyproject.toml`
setuptools_rust = "setuptools-rust>=0.11.4"
install_requirements = ["cffi>=1.12"]
setup_requirements = install_requirements + [setuptools_rust]

if os.environ.get("CRYPTOGRAPHY_DONT_BUILD_RUST"):
rust_extensions = []
Expand Down Expand Up @@ -102,7 +105,7 @@
),
include_package_data=True,
python_requires=">=3.6",
install_requires=setup_requirements,
install_requires=install_requirements,
setup_requires=setup_requirements,
extras_require={
"test": [
Expand All @@ -125,6 +128,9 @@
"twine >= 1.12.0",
"sphinxcontrib-spelling >= 4.0.1",
],
"sdist": [
setuptools_rust,
],
"pep8test": [
"black",
"flake8",
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Expand Up @@ -20,6 +20,7 @@ commands =
extras =
docs
docstest
sdist
basepython = python3
commands =
sphinx-build -T -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
Expand Down

0 comments on commit 048f7c6

Please sign in to comment.