spiralstrip 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,49 @@
1
+ # Build and publish the Spiral Strip Python package
2
+
3
+ The distribution name and import name are `spiralstrip`. The package version is `2.0.0`, corresponding to the GitHub release tag `v2.0`. Run the build commands from the directory containing `pyproject.toml`.
4
+
5
+ ## Build
6
+
7
+ Create a separate build environment on Linux:
8
+
9
+ ```sh
10
+ python -m venv ../spiralstrip-pip-build
11
+ source ../spiralstrip-pip-build/bin/activate
12
+ python -m pip install --upgrade pip build twine
13
+ python -m build
14
+ python -m twine check dist/*
15
+ ```
16
+
17
+ On Windows, activate the environment with `..\spiralstrip-pip-build\Scripts\Activate.ps1` instead of the `source` command.
18
+
19
+ The build creates `dist/spiralstrip-2.0.0-py3-none-any.whl` and `dist/spiralstrip-2.0.0.tar.gz`. The wheel installs the library and its package metadata, including the license. The source distribution also includes the example scripts and build instructions. NumPy and Matplotlib are declared as dependencies; tests and the Conda recipe are excluded.
20
+
21
+ ## Check installation
22
+
23
+ Create a clean environment and install the wheel using its absolute path:
24
+
25
+ ```sh
26
+ python -m venv ../spiralstrip-pip-check
27
+ source ../spiralstrip-pip-check/bin/activate
28
+ python -m pip install --upgrade pip
29
+ python -m pip install /absolute/path/to/dist/spiralstrip-2.0.0-py3-none-any.whl
30
+ python -m pip check
31
+ cd /tmp
32
+ python -c "import spiralstrip; print(spiralstrip.__file__)"
33
+ ```
34
+
35
+ Use a directory outside the source folder for the import check so a local `spiralstrip.py` cannot hide installation problems. Repeat the installation check in another clean environment using `spiralstrip-2.0.0.tar.gz` instead of the wheel. The printed module path should be inside that environment's `site-packages` directory.
36
+
37
+ Displaying figures requires a graphical environment. Saving figures on a server can use Matplotlib's Agg backend and `show=False`.
38
+
39
+ ## Publish
40
+
41
+ After verifying both distributions, activate the build environment, return to the directory containing `pyproject.toml`, and upload the two files:
42
+
43
+ ```sh
44
+ python -m twine upload dist/spiralstrip-2.0.0-py3-none-any.whl dist/spiralstrip-2.0.0.tar.gz
45
+ ```
46
+
47
+ Publication requires a PyPI account, an available project name, and an API token. This command publishes the release publicly; building does not publish anything. PyPI does not allow an uploaded filename to be reused, so complete validation before uploading.
48
+
49
+ For later releases, change the version in `pyproject.toml` and build into a clean `dist` directory. The source distribution published on PyPI can also serve as the source archive for a conda-forge recipe.