Skip to content

Commit ecd3ad5

Browse files
committed
Separate Sphinx install from setup requirements
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.
1 parent 61cb5f5 commit ecd3ad5

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

.circleci/config.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ references:
2020
declare -a FILES=(
2121
"setup.py"
2222
".circleci/requirements.txt"
23-
"setup-requirements.txt"
2423
"docs-requirements.txt"
2524
)
2625
python3 --version >> .docs-checksum
@@ -38,7 +37,7 @@ references:
3837
name: Install Dependencies
3938
command: |
4039
python3 -m venv venv
41-
venv/bin/pip install -r .circleci/requirements.txt -r setup-requirements.txt
40+
venv/bin/pip install -r .circleci/requirements.txt
4241
venv/bin/pip install -r docs-requirements.txt
4342
save-docs-dependencies-cache: &save-docs-dependencies-cache
4443
save_cache:
@@ -50,6 +49,7 @@ references:
5049
name: Build checksum file
5150
command: |
5251
declare -a FILES=(
52+
"script/docs/requirements.txt"
5353
"script/linting/requirements.txt"
5454
"script/typing/requirements.txt"
5555
)
@@ -65,7 +65,6 @@ references:
6565
declare -a FILES=(
6666
"setup.py"
6767
".circleci/requirements.txt"
68-
"setup-requirements.txt"
6968
"all-requirements.txt"
7069
)
7170
python3 --version >> .checksum
@@ -83,7 +82,7 @@ references:
8382
name: Install Dependencies
8483
command: |
8584
python3 -m venv venv
86-
venv/bin/pip install -r .circleci/requirements.txt -r setup-requirements.txt
85+
venv/bin/pip install -r .circleci/requirements.txt
8786
venv/bin/pip install -r all-requirements.txt
8887
save-dependencies-cache: &save-dependencies-cache
8988
save_cache:
@@ -138,7 +137,7 @@ jobs:
138137
name: Build the docs
139138
command: |
140139
source venv/bin/activate
141-
python setup.py build_sphinx
140+
./script/docs/build.sh
142141
143142
lint:
144143
<<: *parametrised-python-executor

dev-requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Changing this? Also update the CI config which builds an equivalent expanded version.
2+
-r script/docs/requirements.txt
23
-r script/linting/requirements.txt
34
-r script/release/requirements.txt
45
-r script/typing/requirements.txt

script/docs/build.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
cd $(dirname $(dirname $(dirname $0)))
4+
5+
exec python setup.py build_sphinx "$@"

script/docs/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../docs/requirements.txt

setup-requirements.txt

-1
This file was deleted.

setup.py

-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
with open('README.rst') as f:
44
long_description = f.read()
55

6-
with open('setup-requirements.txt') as f:
7-
setup_requires = f.readlines()
8-
96
setup(
107
name='sr.comp',
118
version='1.5.0',
@@ -29,7 +26,6 @@
2926
'typing-extensions >= 3.7.4.2',
3027
],
3128
python_requires='>=3.7',
32-
setup_requires=setup_requires,
3329
classifiers=[
3430
'Intended Audience :: Developers',
3531
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',

0 commit comments

Comments
 (0)