Skip to content

Commit

Permalink
build/sage_bootstrap/app.py, src/doc/en/developer/packaging.rst: Add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Sep 26, 2022
1 parent 2efa318 commit d18cfa4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 9 additions & 1 deletion build/sage_bootstrap/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,15 @@ def fix_checksum(self, package_name):
def create(self, package_name, version=None, tarball=None, pkg_type=None, upstream_url=None,
description=None, license=None, upstream_contact=None, pypi=False, source='normal'):
"""
Create a normal package
Create a package
$ sage --package create foo --version 1.3 --tarball FoO-VERSION.tar.gz --type experimental
$ sage --package create scikit_spatial --pypi --type optional
$ sage --package create torch --pypi --source pip --type optional
$ sage --package create jupyterlab_markup --pypi --source wheel --type optional
"""
if '-' in package_name:
raise ValueError('package names must not contain dashes, use underscore instead')
Expand Down
8 changes: 6 additions & 2 deletions src/doc/en/developer/packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ set the ``upstream_url`` field in ``checksums.ini`` described above.
For Python packages available from PyPI, you can use::
[user@localhost]$ sage -package create scikit_spatial --pypi --type optional
[user@localhost]$ sage --package create scikit_spatial --pypi --type optional
This automatically downloads the most recent version from PyPI and also
obtains most of the necessary information by querying PyPI.
Expand All @@ -1117,7 +1117,11 @@ in the file ``install-requires.txt``.
To create a pip package rather than a normal package, you can use::
[user@localhost]$ sage -package create scikit_spatial --pypi --source pip --type optional
[user@localhost]$ sage --package create scikit_spatial --pypi --source pip --type optional
To create a wheel package rather than a normal package, you can use::
[user@localhost]$ sage --package create scikit_spatial --pypi --source wheel --type optional
.. _section-manual-build:
Expand Down

0 comments on commit d18cfa4

Please sign in to comment.