-
Notifications
You must be signed in to change notification settings - Fork 8
Packaging Requirements
-
surmise developers shall be allowed to include
.cfiles in the package including the possibility that some.cfiles be generated automatically byCythonfrom developer created and managed.pyxfiles. -
All
.cfiles shall be included in the version control repository and in source distributions of the package. In accord withCythonandsetuptoolssuggestions, this requirement includes.cfiles generated automatically by Cython from.pyx. In such cases, the.pyxfile shall also be included in the version control repository alongside the associated.cfiles and distributed as well. -
If surmise does include
.cfiles, 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.cfiles 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.tomlfile that specifies the build system environment at the very least. If the repository usesCython, then asetup.pyfile will be used as suggested byCythonto manage the inclusion of the associated C code assetuptoolsextensions. In such a case, the package design shall endeavor to decouplepyproject.tomlandsetup.pyas 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
.cfiles usenumpy, then the package shall be designed so that developers are responsible for determining what single version ofCythonall developers must use to generate.cfiles in the repository and what single version ofnumpyis used both as a target for generation of any.cfiles from.pyxfiles that usenumpyas well as for linking the compiled C code tonumpy. Thenumpyversion shall be specified as the sole acceptable version of thenumpybuild requirement in the build system environment specification inpyproject.toml. The determination ofnumpyversion for compilation as well as for installation shall be made so that thenumpyversion installed by users is compatible with thenumpyversion used to compile code. The set ofnumpyversions allowed at installation shall be specified insetup.pyas usual. At the time of writing this requirement, for example, this means that thenumpyversion 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
numpyversion are compatible with the latest v2numpyversion 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 newnumpyversion is released. This requirement is in accord with numpy suggestions.