Add build/pkgs/SPKG/requirements.txt for all Python SPKG
mkoeppe opened this issue · 9 comments
These files were added in #29287 (SPKG type: Make "normal/script/pip" orthogonal to "base/standard/optional/experimental") for all pip packages.
We record "abstract" version requirements in files build/pkgs/SPKG/install-requires.txt - this is #30719.
In this ticket, we additionally record "concrete" versions for all Python packages in build/pkgs/SPKG/requirements.txt.
(cf. https://packaging.python.org/discussions/install-requires-vs-requirements/)
Some scripts need updating to make sure that checksums.ini wins over requirements.txt - to keep normal packages normal.
Depends on #30719
CC: @slel @jhpalmieri @orlitzky
Component: build
Issue created by migration from https://trac.sagemath.org/ticket/30024
I would strongly suggest to have a look at pipenv, which manages python dependencies via pipfile and pipfile.lock (replacing requirements.txt and checksums.ini (?)).
Description changed:
---
+++
@@ -7,6 +7,9 @@
We record "abstract" version requirements in this file so that many versions are accepted instead of only one particular version. This may be refined later (cf. https://packaging.python.org/discussions/install-requires-vs-requirements/)
-This is a step of Meta-ticket #29023 (In a python 3 build, use system Python packages) and of Meta-ticket #21507 (Make sagelib a pip-installable Python source package, listed on PyPI)
+This is a step of:
+- Meta-ticket #29023 (In a python 3 build, use system Python packages)
+- Meta-ticket #21507 (Make sagelib a pip-installable Python source package, listed on PyPI)
+- #29500 Install all Python packages via `pip wheel`, create PEP 503 simple repository for wheels
Not sure if we can use pipenv as a drop in solution.
For various Python packages, we currently have to use patches or special build steps. I have sketched a way forward in #29500 -- use our custom build scripts to build wheels (and store them in a wheelhouse / private package index), which can then be installed by all standard tools (and also by users into separate venvs). We can certainly generate a Pipfile that makes this easier for users
Description changed:
---
+++
@@ -1,15 +1,12 @@
These files were added in #29287 (SPKG type: Make "normal/script/pip" orthogonal to "base/standard/optional/experimental") for all pip packages.
In this ticket, we add them for all normal Python packages.
+
+This is a technical step for
+- #29500 Install all Python packages via `pip wheel`, create PEP 503 simple repository for wheels
Some scripts need updating to make sure that `checksums.ini` wins over `requirements.txt` - to keep normal packages normal.
We record "abstract" version requirements in this file so that many versions are accepted instead of only one particular version. This may be refined later (cf. https://packaging.python.org/discussions/install-requires-vs-requirements/)
-This is a step of:
-- Meta-ticket #29023 (In a python 3 build, use system Python packages)
-- Meta-ticket #21507 (Make sagelib a pip-installable Python source package, listed on PyPI)
-- #29500 Install all Python packages via `pip wheel`, create PEP 503 simple repository for wheels
-
-Description changed:
---
+++
@@ -1,9 +1,7 @@
These files were added in #29287 (SPKG type: Make "normal/script/pip" orthogonal to "base/standard/optional/experimental") for all pip packages.
-In this ticket, we add them for all normal Python packages.
+In this ticket, we add them for all normal Python packages - so that we have a mapping from SPKG name to distribution name
-This is a technical step for
-- #29500 Install all Python packages via `pip wheel`, create PEP 503 simple repository for wheels
Some scripts need updating to make sure that `checksums.ini` wins over `requirements.txt` - to keep normal packages normal.
Description changed:
---
+++
@@ -1,10 +1,11 @@
These files were added in #29287 (SPKG type: Make "normal/script/pip" orthogonal to "base/standard/optional/experimental") for all pip packages.
-In this ticket, we add them for all normal Python packages - so that we have a mapping from SPKG name to distribution name
+We record "abstract" version requirements in files `build/pkgs/SPKG/install-requires.txt` - this is #30719.
+In this ticket, we additionally record "concrete" versions for all Python packages in `build/pkgs/SPKG/requirements.txt`.
+
+(cf. https://packaging.python.org/discussions/install-requires-vs-requirements/)
Some scripts need updating to make sure that `checksums.ini` wins over `requirements.txt` - to keep normal packages normal.
-We record "abstract" version requirements in this file so that many versions are accepted instead of only one particular version. This may be refined later (cf. https://packaging.python.org/discussions/install-requires-vs-requirements/)
-Closing as not planned.