aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-11-29 22:49:01 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-11-29 22:49:01 +0300
commit44f64ed4f0237238bab7e483634f52802829b01f (patch)
treee5249df268b1c313d96c658de4fea085141bfdfd
parentadd GitHub workflow (diff)
downloadsorting-algorithms-44f64ed4f0237238bab7e483634f52802829b01f.tar.gz
sorting-algorithms-44f64ed4f0237238bab7e483634f52802829b01f.zip
copy the 3.4 workaround from vk-scripts
Diffstat (limited to '')
-rw-r--r--.github/workflows/test.yml4
-rw-r--r--constraints.txt9
-rw-r--r--requirements.txt8
3 files changed, 16 insertions, 5 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 1eb7361..2f64399 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -29,7 +29,9 @@ jobs:
python-version: '${{ matrix.python-version }}'
- name: Install dependencies
- run: pip install -r requirements.txt
+ run: |
+ pip install -r constraints.txt
+ pip install -r requirements.txt
- name: Run the tests
run: ./.ci/plot.sh
diff --git a/constraints.txt b/constraints.txt
new file mode 100644
index 0000000..04e6c11
--- /dev/null
+++ b/constraints.txt
@@ -0,0 +1,9 @@
+# matplotlib 1.5 is one of the versions that works with Python 3.4, and it
+# doesn't specify the upper bound for its numpy dependency. So pip will try to
+# install the latest version, which doesn't work with 3.4. Putting the numpy
+# and the matplotlib requirements to the same requirements.txt file doesn't
+# work unfortunately, the latest version will still get picked up.
+
+# The lower bound is random, 1.16 is the latest version to support 3.4.
+numpy >=1.11,<1.17 ; python_version == '3.4'
+numpy >=1.17 ; python_version > '3.4'
diff --git a/requirements.txt b/requirements.txt
index 8fe1f23..9e942a5 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-numpy>1.11.0
-matplotlib==1.5.1; python_version == '3.4'
-matplotlib==2.1.2; python_version == '3.5'
-matplotlib==3.1.1; python_version > '3.5'
+# Some random known-to-work versions.
+matplotlib ~=1.5 ; python_version == '3.4'
+matplotlib ~=2.1 ; python_version == '3.5'
+matplotlib ~=3.1 ; python_version > '3.5'