Skip to content
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

Add src/requirements.txt for installation of sagelib in a venv #30578

Closed
mkoeppe opened this issue Sep 15, 2020 · 60 comments
Closed

Add src/requirements.txt for installation of sagelib in a venv #30578

mkoeppe opened this issue Sep 15, 2020 · 60 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 15, 2020

After #30527, it is possible to install Python packages built by the Sage distribution into user-defined venvs.

In this ticket, we create build/pkgs/sagelib/src/requirements.txt -> src/requirements.txt to facilitate installing sagelib into such a venv. (This file duplicates some information also available in build/pkgs; #29041 will rectify this.)

A virtual environment using it can be created and doctested using:

./sage -sh -c '(cd build/pkgs/sagelib/src && tox -v -v -v)'

(Reusing wheels built by the Sage distribution requires to do sage -i pip2pi first - this is from #30527.)

Related:

Follow-up tickets:

Depends on #30527
Depends on #30013

CC: @tobiasdiez @kiwifb @jhpalmieri @videlec

Component: build

Keywords: sd111

Branch/Commit: u/mkoeppe/add-src-requirements-txt @ 9ad6b36

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

@mkoeppe mkoeppe added this to the sage-9.2 milestone Sep 15, 2020
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2020

Changed dependencies from #30527 to #29500, #30527, #22731

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2020

Branch: u/mkoeppe/add-src-requirements-txt

@tobiasdiez
Copy link
Contributor

comment:4

What do you think about generating the requirements.txt file from a pipfile: https://pipenv-fork.readthedocs.io/en/latest/advanced.html#generating-a-requirements-txt? (Maybe as part of this ticket or as #29041)


Last 10 new commits:

0a64674build/pkgs/gambit/spkg-install.in: Install via bdist_wheel
ca58693build/pkgs/pillow/spkg-install.in: Install via bdist_wheel
207d80fbuild/pkgs/pip2pi: New
2555e19build/make/install: At the end, update the repository index
5a747c4build/bin/sage-pip-{install,uninstall}: Remove pip2 support
e66243fMerge branch 't/29500/install_all_python_packages_via_pip_wheel__create_pep_503_simple_repository_for_wheels' into t/30527/pep-503-simple-repository-for-wheels
9937126Merge branch 't/30527/pep-503-simple-repository-for-wheels' into t/30371/public/build/inplace
1a39442build/pkgs/sagelib/src/setup.py: Replace symlink to SAGE_SRC/setup.py by a copy
67c56a6src/requirements.txt, src/MANIFEST.in: Move here from build/pkgs/sagelib/src, leave symlinks behind
1d88afeWIP

@tobiasdiez
Copy link
Contributor

Commit: 1d88afe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2020

comment:5

Yes, I started to play a bit with pipenv, and this looks like a possible route.

I would like to keep that for #29041 though.

On the present ticket I would only want to do the most rudimentary thing - basically to try out the adjustments that sagelib will need (see #22731).

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 15, 2020

Changed commit from 1d88afe to ba2a6b9

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 15, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

e83725fsage_setup.command.sage_install.sage_install: Rename to sage_install_and_clean, update use it in src/setup.py; refactor through new class sage_install
ba2a6b9src/requirements.txt: Add sage_conf

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 15, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

033a95asage_setup.command.sage_install: Fixup: Remove cleaning code (moved to sage_install_and_clean)

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 15, 2020

Changed commit from ba2a6b9 to 033a95a

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 17, 2020

Changed commit from 033a95a to 4ed815a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 17, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

4ed815asrc/tox.ini (develop): New

@mkoeppe mkoeppe changed the title Add src/requirements.txt for installation of sagelib in a venv Add src/requirements.txt and src/setup.cfg [install_requires] for installation of sagelib in a venv Sep 19, 2020
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 21, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

85175absrc/setup.py: Switch to setuptools, add setup.cfg, install-requires.txt

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 21, 2020

Changed commit from 4ed815a to 85175ab

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 26, 2020

Changed dependencies from #29500, #30527, #22731 to #29500, #30527, #30658, #22731

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

9ee2110build/bin/sage-dist-helpers: Also use $sudo for storing the wheel file
d7aac84src/doc/en/developer/packaging.rst: Update sdh_... documentation
9b7c7a0build/bin/sage-pip-{install,uninstall}: Fix typo in comment
4135e8bbuild/bin/sage-pip-install: Remove an outdated comment
f2e7075Merge tag '9.2.beta13' into t/29500/install_all_python_packages_via_pip_wheel__create_pep_503_simple_repository_for_wheels
c2efa14Merge branch 't/29500/install_all_python_packages_via_pip_wheel__create_pep_503_simple_repository_for_wheels' into t/30658/conda_forge_ubuntu_standard__pillow_fails_to_install__follow_up_
ff0c973build/pkgs/pillow/spkg-install.in: Fix up 'setup.py bdist_wheel' command
63490fdMerge branch 't/30658/conda_forge_ubuntu_standard__pillow_fails_to_install__follow_up_' into t/30578/add-src-requirements-txt

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2020

Changed commit from 85175ab to 63490fd

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

5a2491aMerge branch 't/29500/install_all_python_packages_via_pip_wheel__create_pep_503_simple_repository_for_wheels' into t/30527/pep-503-simple-repository-for-wheels
4e3a2c3Merge branch 't/30527/pep-503-simple-repository-for-wheels' into t/30578/add-src-requirements-txt

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2020

Changed commit from 63490fd to 4e3a2c3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 16, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

659f723Merge tag '9.2.rc2' into t/30578/add-src-requirements-txt

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 16, 2020

Changed commit from 4e3a2c3 to 659f723

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 16, 2020

Work Issues: rebase on #30779

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 16, 2020

Changed dependencies from #29500, #30527, #30658, #22731 to #30527, #22731 | #30779

@mkoeppe mkoeppe removed this from the sage-9.2 milestone Oct 24, 2020
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 13, 2020

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

f6f1e97Merge branch 't/22731/22731' into t/30578/add-src-requirements-txt
1a93d0dMerge branch 't/30780/sage_setup__separate_installing_and_cleaning' into t/30578/add-src-requirements-txt
a796d49src/requirements.txt, src/MANIFEST.in: Move here from build/pkgs/sagelib/src, leave symlinks behind
aebb1ceWIP
95f02a1src/requirements.txt: Add sage_conf
8e12b7csrc/tox.ini (develop): New
9ddaf26src/setup.py: Switch to setuptools, add setup.cfg, install-requires.txt
8a5d01fsrc/requirements.txt, src/setup.cfg: Fix up
7f9388dbuild/pkgs/sagelib/src: Add more symlinks to SAGE_ROOT/src
d3f3683WIP

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 13, 2020

Changed commit from a4fd284 to d3f3683

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 13, 2020

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 13, 2020

comment:30

Now, with #30013 merged, the correct sage script is executed in the venv created by tox.

What remains to be done is to add more packages to requirements.txt - in particular ipywidgets so that the doctester can run.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 14, 2020

Changed commit from d3f3683 to 8c03c6b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 14, 2020

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

842995fsrc/bin/sage-venv-config: Add comment
1a518c0src/bin/sage: Set SAGE_VENV from sage-venv-config
d372ecfsrc/bin/sage-env: Put $SAGE_VENV/bin before $SAGE_LOCAL/bin in PATH
0140f84src/bin/sage-src-env-config.in: New, sourced in src/bin/sage
948fb49Merge branch 'u/mkoeppe/src_bin_sage_env__make_sure__sage_venv_bin_is_at_the_beginning_of_the_path' of git://trac.sagemath.org/sage into t/30578/add-src-requirements-txt
e96dc7asrc/requirements.txt, src/MANIFEST.in: Move here from build/pkgs/sagelib/src, leave symlinks behind
367fd3esrc/tox.ini (develop): New
0c5a1a1WIP
7121cb7src/requirements.txt: Add sage_conf
8c03c6bsrc/setup.py: Switch to setuptools, add setup.cfg, install-requires.txt

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 14, 2020

Changed commit from 8c03c6b to e2d498f

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 14, 2020

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

55d59f8src/requirements.txt: Add more packages
e2d498fbuild/pkgs/sagelib/src/tox.ini: Update tests and instructions

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 14, 2020

comment:34

This works; only minor issues in doctests remain.

File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/src/sage/interfaces/gap_workspace.py", line 55, in sage.interfaces.gap_workspace.gap_workspace_file
Failed example:
    name1 = Popen([sys.executable, '-c', cmd], stdout=PIPE).communicate()[0]
Expected nothing
Got:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/build/pkgs/sagelib/src/sage/all.py", line 125, in <module>
        import sage.misc.lazy_import
    ModuleNotFoundError: No module named 'sage.misc.lazy_import'

There are also some doctest errors in the pexpect interfaces for singular and gap.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 14, 2020

comment:36

The fpylll package unfortunately does not install because it does not declare its build dependencies correctly. Reported upstream: fplll/fpylll#185

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 14, 2020

Changed commit from e2d498f to db148ac

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 14, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

db148acsrc/requirements.txt: Disable fpylll

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 14, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

9ad6b36build/pkgs/sagelib/src/setup.cfg: Remove

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 14, 2020

Changed commit from db148ac to 9ad6b36

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Add src/requirements.txt and src/setup.cfg [install_requires] for installation of sagelib in a venv Add src/requirements.txt for installation of sagelib in a venv Nov 14, 2020
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 6, 2020

Changed keywords from none to sd111

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 6, 2020

Changed dependencies from #30527, #22731, #30780, #30013 to #30527, #30013

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 18, 2021

Changed author from Matthias Koeppe to none

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 18, 2021

comment:43

Let's skip this ticket and do #30913 directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants