UX for constraining build-time and runtime dependencies
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- numpy, python
- Área
- build-system
Línea de trabajo
Empieza revisando la configuración propuesta de pyproject.toml y el soporte de mesonpy descrito en el issue. Rastrea cómo interactuarían las dependencias en tiempo de compilación, runtime_pinnings y los cambios de dependencias en la rama de release; el informe no menciona archivos fuente ni tests. Se considera terminado definir e implementar el comportamiento de pinning para NumPy, solo correcciones de errores y dependencias de runtime exactas, con cobertura para las compilaciones de release.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
There is a practical UX problem with pyproject.toml that we need to solve. A short description would be:
- Any project that builds against the
numpyC API has to deal with API and ABI compatibility (see the numpy docs on that for details). - as a consequence, the dependency specification for local development is different from the one needed for uploading an sdist to PyPI:
- for local development, you want loose dependencies, e.g.
numpy >= 1.19.5(both a build and runtime dep) - in sdist released to PyPI you want:
oldest-supported-numpy(build dep metapackage, contains==pins per platform) andnumpy>='buildtime_dep,<1.25.0' # should beN+3whereN is current minor version.
- for local development, you want loose dependencies, e.g.
That is obviously a complex set of dependencies to express in pyproject.toml, and we can't have two sets in there at the same time. The solution @FFY00 and I just discussed is:
- On the
mainbranch, use the loose development dependencies (numpy>=1.19.5) - In the CI job(s) that produce artifacts for release to PyPI, ensure that the lowest supported dependencies (which may be platform-dependent) are installed.
- In the release branch, replace the dependencies with the build-time deps needed for uploading to PyPI.
- Have support in
mesonpyfor the various kinds of pinnings people need for releases and API/ABI compatibility.
A rough sketch of how (4) could look:
[build-system]
requires = [
"numpy >= 1.19.5", # replace with (e.g.) `oldest-supported-numpy` in a release branch
]
[tool.mesonpy]
runtime_pinnings = [
# if build version detected is 1.20.3, replace with `>=1.20.3` (while preserving the upper bound,
# so end result would be for example `'>=1.20.3,<1.25.0')
"numpy = 'pin_compatible'",
"pythran = 'bugfix_only'", # if build version detected is 0.10.0, override the build dependency with `'>=0.10.0,<0.11.0'`
"torch = 'exact'", # runtime version must equal build-time version (PyTorch has no ABI stability guarantees)
]
Note that this feature is needed for some other packages than just NumPy too (basically every package offering a C/C++ API has to deal with this), but NumPy alone is important enough - every package containing even a single Cython extension which uses NumPy has to deal with this. However, it's probably still a bit too specific to want native support in pyproject.toml via a standard that all tools must implement. Hence the choice to put this in mesonpy.
- Lenguaje dominante
- Python
- Estrellas
- 180
- Forks
- 93
- Merge medio
- 20 h 58 min
- PR fusionados (30 d)
- 22
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de mesonbuild/meson-python
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
mesonbuild/meson-python#541 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
mesonbuild/meson-python#473 · 6 comentarios ·
Los mantenedores suelen responder en 1 día
-
documentation enhancement tests
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
mesonbuild/meson-python#903 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
mesonbuild/meson-python#871 · 7 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
pip install overrides existing build configurationPosiblemente ocupada @Alvaro-Kothe la tomó hace 113 días. Abiertoquestion
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
mesonbuild/meson-python#851 · 6 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de mesonbuild/meson-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 3 días
-
Negation with "not" and "no" is ignored during sentiment analysisPosiblemente ocupada @vivek-3728 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
techcsispit/mess-mood#11 · 1 comentario ·
-
changelog investigate
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ramnes/notion-sdk-py#408 ·
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
btclib-org/btclib-wallet#267 ·
Los mantenedores suelen responder en 1 día
-
good first issue tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
knnmelprop/YAADO#111 ·