-
-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
103 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,40 @@ | ||
= Publishing Python Projects | ||
= Python Packaging & Publishing | ||
:page-aliases: Publishing_Python_Projects.adoc | ||
|
||
include::partial$gtag-config.adoc[] | ||
|
||
This page will discuss common topics around publishing your Python projects for others to use | ||
include::partial$example/pythonlib/publishing/1-publish-module.adoc[] | ||
|
||
== Building packages locally | ||
== Advanced Packaging | ||
|
||
include::partial$example/pythonlib/publishing/1-publish-module.adoc[] | ||
Behind the scenes, Mill delegates most Python packaging tasks to other tools, | ||
and only takes care of configuring them with information it has on your build. | ||
|
||
By default, it will: | ||
|
||
* create a synthetic `pyproject.toml` file from its own metadata | ||
|
||
* use `setuptools` to package the module | ||
|
||
* first create a source distribution and then use that to build a wheel (instead of building a wheel directly) | ||
|
||
While this should be sufficient for most projects, sometimes you need a little | ||
customization. | ||
|
||
=== Customizing the `pyproject.toml` and other build files | ||
|
||
If you're happy to use a PEP-518-compliant `pyproject.toml` to describe how to | ||
package your published project, but would like some customization, you can amend | ||
the `pyproject` task with your own metadata. | ||
|
||
You can also include additional files in the packaging process by adding them to | ||
`buildFiles`. You can then reference these in your `pyproject.toml` file. | ||
|
||
TODO: example | ||
|
||
== Uploading packages to PyPI | ||
=== Changing the packaging process entirely | ||
|
||
// include::partial$Publishing_Footer.adoc[] | ||
In case customizing of `pyproject` is too cumbersome, or you cannot use it for | ||
some reason, you can always override the `sdist` and `wheel` tasks with your own | ||
packaging implementation. Publishing with `__publish` will still work as usual. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters