Skip to content

sage --package create PACKAGE --pypi #30974

@mkoeppe

Description

@mkoeppe

We add a simple command that creates a normal package from PyPI.

$ ./sage -package create scikit_spatial --pypi
Downloading tarball to /Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/upstream/scikit-spatial-5.0.0.tar.gz
[......................................................................]
$ ls build/pkgs/scikit_spatial/
SPKG.rst		dependencies		package-version.txt	type
checksums.ini		install-requires.txt	spkg-install.in
$ cat build/pkgs/scikit_spatial/SPKG.rst 
scikit_spatial
==============

Description
-----------

Spatial objects and computations based on NumPy arrays.

License
-------

BSD license

Upstream Contact
----------------

https://pypi.org/project/scikit-spatial/

Additionally, we fix the following error that occurs in sage --package create when --type is not set:

./sage -package create jupyter_jsmol --tarball jupyter_jsmol-VERSION.tar.gz --url https://pypi.io/packages/source/j/jupyter-jsmol/jupyter_jsmol-VERSION.tar.gz --version 0.2.4
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/build/bin/../sage_bootstrap/package.py", line 291, in _init_type
    with open(os.path.join(self.path, 'type')) as f:
IOError: [Errno 2] No such file or directory: '/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/build/pkgs/jupyter_jsmol/type'

The fix just uses type optional in this situation, which is a good default.

CC: @seblabbe @jhpalmieri @malb

Component: build

Keywords: sd111

Author: Matthias Koeppe

Branch/Commit: 0c42490

Reviewer: Sébastien Labbé

Issue created by migration from https://trac.sagemath.org/ticket/30974

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions