Skip to content

Commit

Permalink
Separate Sphinx install from setup requirements
Browse files Browse the repository at this point in the history
Having this in the setup_requires has started to hit issues recently
and separating it seems to be more in line with where Python packaging
is going.
  • Loading branch information
PeterJCLaw committed Jan 21, 2023
1 parent 61cb5f5 commit ecd3ad5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
9 changes: 4 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ references:
declare -a FILES=(
"setup.py"
".circleci/requirements.txt"
"setup-requirements.txt"
"docs-requirements.txt"
)
python3 --version >> .docs-checksum
Expand All @@ -38,7 +37,7 @@ references:
name: Install Dependencies
command: |
python3 -m venv venv
venv/bin/pip install -r .circleci/requirements.txt -r setup-requirements.txt
venv/bin/pip install -r .circleci/requirements.txt
venv/bin/pip install -r docs-requirements.txt
save-docs-dependencies-cache: &save-docs-dependencies-cache
save_cache:
Expand All @@ -50,6 +49,7 @@ references:
name: Build checksum file
command: |
declare -a FILES=(
"script/docs/requirements.txt"
"script/linting/requirements.txt"
"script/typing/requirements.txt"
)
Expand All @@ -65,7 +65,6 @@ references:
declare -a FILES=(
"setup.py"
".circleci/requirements.txt"
"setup-requirements.txt"
"all-requirements.txt"
)
python3 --version >> .checksum
Expand All @@ -83,7 +82,7 @@ references:
name: Install Dependencies
command: |
python3 -m venv venv
venv/bin/pip install -r .circleci/requirements.txt -r setup-requirements.txt
venv/bin/pip install -r .circleci/requirements.txt
venv/bin/pip install -r all-requirements.txt
save-dependencies-cache: &save-dependencies-cache
save_cache:
Expand Down Expand Up @@ -138,7 +137,7 @@ jobs:
name: Build the docs
command: |
source venv/bin/activate
python setup.py build_sphinx
./script/docs/build.sh
lint:
<<: *parametrised-python-executor
Expand Down
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changing this? Also update the CI config which builds an equivalent expanded version.
-r script/docs/requirements.txt
-r script/linting/requirements.txt
-r script/release/requirements.txt
-r script/typing/requirements.txt
5 changes: 5 additions & 0 deletions script/docs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

cd $(dirname $(dirname $(dirname $0)))

exec python setup.py build_sphinx "$@"
1 change: 1 addition & 0 deletions script/docs/requirements.txt
1 change: 0 additions & 1 deletion setup-requirements.txt

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
with open('README.rst') as f:
long_description = f.read()

with open('setup-requirements.txt') as f:
setup_requires = f.readlines()

setup(
name='sr.comp',
version='1.5.0',
Expand All @@ -29,7 +26,6 @@
'typing-extensions >= 3.7.4.2',
],
python_requires='>=3.7',
setup_requires=setup_requires,
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
Expand Down

0 comments on commit ecd3ad5

Please sign in to comment.