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

New make targets "sagelib-tox-...", "sage_docbuild-tox-...", ... #31535

Closed
mkoeppe opened this issue Mar 22, 2021 · 34 comments
Closed

New make targets "sagelib-tox-...", "sage_docbuild-tox-...", ... #31535

mkoeppe opened this issue Mar 22, 2021 · 34 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Mar 22, 2021

For all script packages SPKG that have an embedded source tree -- currently sagelib, sage_docbuild, sage_sws2rst -- we add a new target:

  • SPKG-tox-% (which calls tox -e % in the package's source tree)

These targets are particularly useful for invoking them within the portability tests of the top-level tox:

Depends on #32899

CC: @jhpalmieri @dimpase @kliem @orlitzky @tobiasdiez

Component: porting

Author: Matthias Koeppe

Branch/Commit: ad12d25

Reviewer: Michael Orlitzky

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

@mkoeppe mkoeppe added this to the sage-9.3 milestone Mar 22, 2021
@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 22, 2021

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 22, 2021

Author: Matthias Koeppe

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 22, 2021

New commits:

1eef6d6build/make/Makefile.in: Add targets SPKG-sdist, SPKG-tox, SPKG-tox-% for script packages

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 22, 2021

Commit: 1eef6d6

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 22, 2021

Changed commit from 1eef6d6 to 6964933

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 22, 2021

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

6964933build/make/Makefile.in: fixup

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 22, 2021

Changed commit from 6964933 to 188bf2e

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 22, 2021

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

9993348build/make/Makefile.in: Run targets SPKG-tox, SPKG-tox-% outside of sage-env, using SAGE_ORIG_PATH - so that tox from conda works
4533018tox.ini: Add local-conda-environment-src
188bf2etox.ini, src/doc/bootstrap: Get tox into standard builds

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 2, 2021

comment:11

Moving this ticket to 9.4, as it seems unlikely that it will be merged in 9.3, which is in the release candidate stage

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Apr 2, 2021
@mkoeppe
Copy link
Member Author

mkoeppe commented Jul 19, 2021

comment:12

Setting a new milestone for this ticket based on a cursory review.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 16, 2021

Dependencies: #32442, #32698

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 16, 2021

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

8af6041Merge tag '9.5.beta2' into t/32442/__configure__make___with_sage_venv_the_default
b3f7d34.gitignore: Add /venv
fc4b641configure.ac: Remove conveniene symlinks before (re)creating them
8bcbf1dMakefile (distclean): Remove convenience symlinks prefix, venv
dcb4a08configure.ac: Indicate default in help string for --with-sage-venv
e33bc89Merge tag '9.5.beta3' into t/32442/__configure__make___with_sage_venv_the_default
2101b8cbuild/pkgs/python3/spkg-build.in: Make sure that python finds sqlite3 when determining which extension modules to build
3bbc5d8build/pkgs/python3/spkg-build.in: Set rpath
124b605Merge #32698
bca2141pkgs/sagemath-standard/tox.ini: Use SAGE_VENV or venv symlink to find wheels

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 16, 2021

Changed commit from 188bf2e to bca2141

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 16, 2021

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

bdbab3abuild/make/Makefile.in: Remove SPKG-tox, SPKG-sdist targets

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 16, 2021

Changed commit from bca2141 to bdbab3a

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 16, 2021

comment:17

Reduced the scope of the ticket

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title New make targets "sagelib-sdist", "sage_docbuild-sdist", ... and "sagelib-tox-...", ... New make targets "sagelib-tox-...", "sage_docbuild-tox-...", ... Oct 16, 2021
@orlitzky
Copy link
Contributor

orlitzky commented Dec 1, 2021

comment:18

I've tried to test these locally but I always get some complaint about sage_setup.py. For example,

$ EXTRA_CONFIGURE_ARGS="--without-system-python3" tox -e local-direct -- build sagelib-tox-python-sagewheels

This proceeded to build everything inside of .tox/local-direct, but then...

cd '/home/mjo/src/sage.git/build/pkgs/sagelib/src' && export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/12/bin:/home/mjo/bin:/home/mjo/bin" && SAGE_SPKG_WHEELS=/home/mjo/src/sage.git/.tox/local-direct/local/var/lib/sage/wheels tox -v -v -v -e python-sagewheels
using tox.ini: /home/mjo/src/sage.git/pkgs/sagemath-standard/tox.ini (pid 12133)
  removing /home/mjo/src/sage.git/pkgs/sagemath-standard/.tox/log
using tox-3.24.4 from /usr/lib/python3.9/site-packages/tox/__init__.py (pid 12133)
GLOB start: packaging 
GLOB sdist-make: /home/mjo/src/sage.git/pkgs/sagemath-standard/setup.py
[12140] /home/mjo/src/sage.git/pkgs/sagemath-standard$ /usr/bin/python3.9 setup.py sdist --formats=zip --dist-dir /home/mjo/src/sage.git/pkgs/sagemath-standard/.tox/dist >.tox/log/GLOB-0.log
ERROR: invocation failed (exit code 1), logfile: /home/mjo/src/sage.git/pkgs/sagemath-standard/.tox/log/GLOB-0.log
================================== log start ===================================
Traceback (most recent call last):
  File "/home/mjo/src/sage.git/pkgs/sagemath-standard/setup.py", line 31, in <module>
    from sage_setup.excepthook import excepthook
ModuleNotFoundError: No module named 'sage_setup'

=================================== log end ====================================
ERROR: FAIL could not package project - v = InvocationError('/usr/bin/python3.9 setup.py sdist --formats=zip --dist-dir /home/mjo/src/sage.git/pkgs/sagemath-standard/.tox/dist', 1)
make[1]: *** [Makefile:2798: sagelib-tox-python-sagewheels] Error 2
make[1]: Leaving directory '/home/mjo/src/sage.git/build/make'

real	0m4.988s
user	0m1.223s
sys	0m0.145s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make sagelib-tox-python-sagewheels'):

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

make: *** [Makefile:39: sagelib-tox-python-sagewheels] Error 1
ERROR: InvocationError for command /bin/bash -c 'export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/12/bin:/home/mjo/bin:/home/mjo/bin && : &&  case "" in 1|y*|Y*);; *) ./bootstrap ;; esac &&  : &&  case "" in 1|y*|Y*);; *) ./configure --prefix=/home/mjo/src/sage.git/.tox/local-direct/local --enable-experimental-packages --enable-download-from-upstream-url  --with-system-python3=yes  --without-system-python3 ;; esac &&  case "build sagelib-tox-python-sagewheels" in  bash)    bash -i; exit ;;  config*) ;;  *)       make -k V=0 base-toolchain ;;  esac &&  make -k V=0 SAGE_CHECK=warn SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"  build sagelib-tox-python-sagewheels && ( [ -z "" ] || make -k V=0 SAGE_CHECK=warn SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"  || echo "(error ignored)" ) ' (exited with code 2)
__________________________________________________________________________________ summary __________________________________________________________________________________
ERROR:   local-direct: commands failed

Is that expected (did I construct my example wrong?)

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 1, 2021

Changed dependencies from #32442, #32698 to #32899

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 1, 2021

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

e5ad518pkgs/sagemath-standard/setup.py: Do not depend on sage_setup for sdist or egg_info
821d16esrc/doc/en/developer/packaging_sage_library.rst: Add bootstrap to testing instructions to avoid the trap of #32868
77c957fsrc/doc/en/developer/packaging_sage_library.rst: Put hierarchy section one level higher
9375ef8pkgs/sagemath-standard/tox.ini: Use SAGE_VENV or venv symlink to find wheels
c6fc111Prettier diagram
7d6a44cUse :mod: as markup for packages/modules
f83d424Improve ABC example
817a8d0src/doc/en/developer/packaging_sage_library.rst: More :mod: and :class: markup
b555735src/doc/en/developer/packaging_sage_library.rst: Link to pypi.org and to documentation of packaging metadata
ad12d25Merge #32899

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 1, 2021

Changed commit from bdbab3a to ad12d25

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 1, 2021

comment:21

Should be better with this branch

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 1, 2021

comment:22

(needs ./bootstrap)

@orlitzky
Copy link
Contributor

orlitzky commented Dec 3, 2021

comment:23

I just noticed these as well, probably from an empty $CC --version in sage_setup. No idea if they're new, I probably just happened to be looking in the right place at exactly the right time:

  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Running command /home/mjo/src/sage.git/pkgs/sagemath-standard/.tox/python-s\
agewheels-nopypi/bin/python /home/mjo/src/sage.git/pkgs/sagemath-standard/.tox/\
python-sagewheels-nopypi/lib/python3.9/site-packages/pip/_vendor/pep517/in_proc\
ess/_in_process.py prepare_metadata_for_build_wheel /tmp/tmphl6_9kin
    /bin/sh: 1: --version: not found
  Building wheel for sagemath-standard (PEP 517): started
  Running command /home/mjo/src/sage.git/pkgs/sagemath-standard/.tox/python-sag\
ewheels-nopypi/bin/python /home/mjo/src/sage.git/pkgs/sagemath-standard/.tox/py\
thon-sagewheels-nopypi/lib/python3.9/site-packages/pip/_vendor/pep517/in_proces\
s/_in_process.py build_wheel /tmp/tmpqovldekw
  /bin/sh: 1: --version: not found

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 4, 2021

comment:24

Yes, this is #30876

@orlitzky
Copy link
Contributor

orlitzky commented Dec 4, 2021

Reviewer: Michael Orlitzky

@orlitzky
Copy link
Contributor

orlitzky commented Dec 4, 2021

comment:25

Looking better now; regardless, the Makefile targets themselves are working as intended.

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 4, 2021

comment:26

Thanks!

@vbraun
Copy link
Member

vbraun commented Dec 23, 2021

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