-
Notifications
You must be signed in to change notification settings - Fork 7
Packaging Requirements
-
surmise developers shall be allowed to include
.c
files in the package including the possibility that some.c
files be generated automatically byCython
from developer created and managed.pyx
files. -
All
.c
files shall be included in the version control repository and in source distributions of the package. In accord withCython
andsetuptools
suggestions, this requirement includes.c
files generated automatically by Cython from.pyx
case. In such cases, the.pyx
file shall also be included in the version control repository alongside the associated.c
files and distributed as well. -
If surmise does include
.c
files, then the developers shall build, test, and distribute via PyPI prebuilt binary wheels for current versions of Python for use with macOS (Intel and ARM64 processors), Linux, and Windows (via Ubuntu). The source distribution shall also be distributed via PyPI so that users with a system not compatible with a prebuilt binary wheel can still build and install surmise. A procedure shall be provided in a high-level README to aid building and installing the package manually from source. If no.c
files are used, the package shall be distributed via PyPI as a source distribution and a universal Python wheel. -
To adhere to PEP518, the package shall include a
pyproject.toml
file that specifies the build system environment at the very least. If the repository usesCython
, then asetup.py
file will be used as suggested byCython
to manage the inclusion of the associated C code assetuptools
extensions. In such a case, the package design shall endeavor to decouplepyproject.toml
andsetup.py
as much as possible by including in the former only those specifications needed to build and distribute the package (e.g., the build system environment specification, automatic version determination needed before building viasetuptools-scm
, building/testing prebuilt binary wheels viacibuildwheel
). -
If
.c
files usenumpy
, then the package shall be designed so that developers are responsible for determining what single version ofCython
all developers must use to generate.c
files in the repository (if any) and what single version of thenumpy
is used both as a target for generation of any.c
files from.pyx
files that usenumpy
as well as for linking the compiled C code tonumpy
. Thenumpy
version shall be specified as the sole acceptable version of thenumpy
build requirement in the build system environment specification inpyproject.toml
. The determination ofnumpy
version for compilation as well as for installation shall be made so that thenumpy
version installed by users is compatible with thenumpy
version used to compile code. The set ofnumpy
versions allowed at installation shall be specified insetup.py
as usual. At the time of writing this requirement, for example, this means that thenumpy
version used at build time must be from v2 so that it is compatible with all allowed v2.X installations as well as all compatible v1.Y versions. -
The repository infrastructure shall include testing that verifies that surmise packages built with the fixed build-time
numpy
version are compatible with the latest v2numpy
version as well as the oldest v1.Y version supported by surmise as expressed insetup.py
. If possible, tools such as dependabot shall be incorporated so that such tests are run every time a newnumpy
version is released. This requirement is in accord with numpy suggestions.