-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta-ticket: Make sagelib a pip-installable Python source package, listed on PyPI #21507
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:10
Thanks for taking the lead on this. There's more still be to added to the list of issues, such as providing binary wheels and how that will be handled. I think it will be important to also make more progress on making some hard dependencies optional (that is, allow optional features to fail gracefully if a dependency for that feature is not found). |
comment:11
Replying to @embray:
Definitely. I'm hoping that we can use this ticket to organize it.
I agree. |
comment:12
Here's a question for the distutils experts. Is a Python package allowed to install things in |
This comment has been minimized.
This comment has been minimized.
comment:14
This Python package, which is part of SMC, installs many things to /usr/local/bin using completely standard approaches: https://github.com/sagemathinc/smc/tree/master/src/smc_pyutil. See, in particular, the console_scripts section of setup.py: https://github.com/sagemathinc/smc/blob/master/src/smc_pyutil/setup.py#L58 |
comment:15
Thanks a lot! Following your pointer, I've found this documentation: http://python-packaging.readthedocs.io/en/latest/command-line-scripts.html, which I will refer to alongside the example that you pointed out. |
This comment has been minimized.
This comment has been minimized.
comment:17
This now #21569. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:21
I don't like the phrasing "PyPI package". There's no such thing as a "PyPI package" per se. |
comment:22
I wonder if this work might not also benefit from adopting portions of astropy-helpers into Sage's build tools. I don't think it would necessarily be appropriate to use directly--although there's nothing very "astropy" specific in astropy-helpers, a lot of it does assume one is using the astropy project template, or something close to it. But large swaths of it are very generic, and I put a lot of work into developing tools for build sanity of large Python projects. Some key features that I think might benefit sage include:
Those are the main ones for now but I could probably think of more. |
comment:23
Replying to @embray:
The scope of this ticket is a source package that is pip-installable and would be listed as such on PyPI. Binary packaging (about which I don't know anything at the moment) is beyond the scope of this ticket. |
comment:24
Replying to @embray:
This all sounds great and seems like it could be part of #21508 or be a follow up to it. |
comment:25
I've updated the description to explain the scope of the ticket better. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:53
There is interest in this process, see |
This comment has been minimized.
This comment has been minimized.
comment:54
Added #25546 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:58
I propose that we get this task ticket done in 2020. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:61
The major problem I feel with making something like Sage into a python package is owing to the enormous complexity of Sagemath, the application itself has such major features , and I am not sure how much would we need to modify the application in order to help the proper incorporation of Sage into ordinary python code. |
comment:62
Yes, the complexity is why we use a meta-ticket to organize the necessary steps. If you want to help, you can work on a well-defined ticket such as #21516. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:69
Let's close this ticket. Meta-ticket #29705 describes the updated plan. |
Reviewer: Dima Pasechnik |
This task ticket, organizing the steps necessary to eventually provide sagelib via PyPI, has been superseded by Meta-ticket #29705: Modularize sagelib into separate distributions (distutils packages).
. . . . . . . . . . . . . . . . .
It would be used by a Python user as follows. Let's assume a user has already installed every package that sage-the-distribution provides on their distribution.
Then a simple
would install sagelib in the user's Python installation. Then the user could do
from sage.all import *
.. . . . . . . . . . . . . . . . .
Here are the first steps:
src/setup.py
to bring it to standard distutils behaviorsagelib setup.py
self-contained, independent ofSAGE_ROOT
src/setup.py sdist
)src/setup.py
respect--build-base
and--inplace
, independent ofSAGE_CYTHONIZED
src/setup.py
respects--install-base
and--root
thebe.js
)./bootstrap
time, generatesrc/requirements.txt
,src/constraints.txt
,src/setup.cfg
[install_requires]
frombuild/pkgs
for src/setup.py
SAGE_SRC/ext/
inSAGE_LOCAL/share/sage/ext/
should be done bysetup.py
, notbuild/make/Makefile
src/bin/*
scripts viasetup.py
(scripts
,console_scripts
)src/bin/
elsewhere (and also move their install location)COPYING.txt
inSAGE_LOCAL
and use it frommisc/copying.py
src/sage
sage_conf
: Provides optional configuration information forsagelib
This defines milestone 1.
sagelib
is now a well-behaved Python package. It can be built and installed as follows (without invokingsage -sh
):. . . . . . . . . . . . . . . . .
Next steps:
This defines milestone 2.
sagelib
can now be built and installed as follows (without invokingsage -sh
):. . . . . . . . . . . . . . . . .
Next steps:
This defines milestone 3. If SAGE_LOCAL is not set, then sagelib will discover system packages and Python packages installed in standard places.
At this point, sagelib will be a standard pip-installable Python source package, ready for upload to PyPI.
Binary packages (using wheels etc.) is beyond the scope of this ticket.
. . . . . . . . . . . . . . . . .
See also:
. . . . . . . . . . . . . . References . . . . . . . . . . . . . . .
CC: @jdemeyer @williamstein @vbraun @videlec @dimpase @kiwifb @embray @nexttime @sagetrac-aenge @nthiery @miguelmarco @kwankyu @robertwb @infinity0 @tobihan @defeo @slel @timokau @kevinywlui @isuruf @jhpalmieri
Component: build
Keywords: pip, PyPI
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/21507
The text was updated successfully, but these errors were encountered: