You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -268,7 +269,7 @@ In order to build a distribution of your package locally instead of publishing i
268
269
make dist
269
270
```
270
271
271
-
This builds a source package and a binary distribution, and stores the files in your local `dist/` folder.
272
+
This builds a source package ([sdist](https://packaging.python.org/en/latest/discussions/package-formats/#what-is-a-source-distribution)) and a binary distribution ([wheel](https://packaging.python.org/en/latest/discussions/package-formats/#what-is-a-wheel)), and stores the files in your local `dist/` folder.
272
273
273
274
You can also generate a changelog and bump the version manually and locally using commitizen (already installed as a dev dependency), for example:
274
275
@@ -277,6 +278,27 @@ cz changelog
277
278
cz bump
278
279
```
279
280
281
+
## Building from a source distribution package
282
+
283
+
The source distribution package ([sdist](https://packaging.python.org/en/latest/discussions/package-formats/#what-is-a-source-distribution)) contains everything needed in order to check, test, and build a binary distribution ([wheel](https://packaging.python.org/en/latest/discussions/package-formats/#what-is-a-wheel)) and its documentation; that is particulalry useful for third-party packaging services that build their own software distribution packages using custom processes.
284
+
285
+
To build from a source distribution package, simply follow these steps:
286
+
287
+
```bash
288
+
tar zxvf package.tar.gz # Unpack the sdist tar file.
289
+
cd package/
290
+
git init # We need this to be a Git repository to run checks.
291
+
git add .# Add all files so tools find them via the VCS.
292
+
```
293
+
294
+
We do need to initialize the package folder as a Git repository to ensure the Makefile is able to call various checkers via hooks. Once done, we can use `make` as before:
295
+
296
+
```bash
297
+
SKIP=check-hooks-apply,check-useless-excludes,actionlint make dist
298
+
```
299
+
300
+
Note that we skip Git hooks that are unnecessary when building from the source distribution. As above, this builds the source package and a binary distribution, and stores both in the `dist/` folder. And, as expected, setting the `SOURCE_DATE_EPOCH` environment variable to the build epoch value of the original sdist and wheel build results in the bit-exact same binary distribution package!
301
+
280
302
## Build integrity using SLSA framework
281
303
282
304
The build process in this repository follows the requirements in the [SLSA framework](https://slsa.dev/) to be compliant at level 3. An important aspect of SLSA to improve the supply chain security posture is to generate a verifiable provenance for the build pipeline. Such a provenance can be used to verify the builder and let the consumers check the materials and configurations used while building an artifact. In this repository we use the [generic provenance generator reusable workflow](https://github.com/slsa-framework/slsa-github-generator) to generate a provenance that can attest to the following artifacts in every release:
0 commit comments