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

Testsuite for src/setup.py #21678

Closed
mkoeppe opened this issue Oct 10, 2016 · 7 comments
Closed

Testsuite for src/setup.py #21678

mkoeppe opened this issue Oct 10, 2016 · 7 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Oct 10, 2016

We should have a testsuite that tests the correct operation and interaction of various commands that a distutils-based setup.py should support.

Does something like this exist in the Python world already?

CC: @jdemeyer @embray @vbraun

Component: build

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

@mkoeppe mkoeppe added this to the sage-7.5 milestone Oct 10, 2016
@vbraun
Copy link
Member

vbraun commented Oct 10, 2016

comment:1

Not that I know of; Usually you realize pretty quickly that you can't install your project.

Any non-trivial functionality of setup.py should be implemented in the sage_setup library which can be unit tested in the usual way.

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 10, 2016

comment:2

Replying to @vbraun:

Not that I know of; Usually you realize pretty quickly that you can't install your project.

Any non-trivial functionality of setup.py should be implemented in the sage_setup library which can be unit tested in the usual way.

Yes, but I am thinking of higher-level tests, for example to ensure that making an sdist and then unpacking-building-cleaning succeeds and gives a tree that is the same as in the sdist archive. This is currently not tested at all and broken (#21516).

@embray
Copy link
Contributor

embray commented Oct 11, 2016

comment:3

That's not a bad idea. astropy-helper has a number of functional tests to this effect: https://github.com/astropy/astropy-helpers/tree/master/astropy_helpers/tests

They're specifically geared toward testing the code in astropy-helpers itself, but this tests a lot of the other expected outputs of setup.py in the process.

@mkoeppe
Copy link
Member Author

mkoeppe commented Oct 25, 2016

comment:4

Ticket #21516 (Fix sagelib sdist) now has a test (sdistcheck) but it currently fails.

@mkoeppe mkoeppe modified the milestones: sage-7.5, sage-8.0 Mar 29, 2017
@jdemeyer
Copy link

jdemeyer commented Apr 1, 2017

comment:6

Just a pointer: I implemented a pretty extensive installation test suite for cysignals. It tests installation with --prefix, --root and --user. It tests setup.py sdist and tests distclean.

See https://github.com/sagemath/cysignals/blob/master/Makefile#L71 and following.

@mkoeppe
Copy link
Member Author

mkoeppe commented May 1, 2020

comment:7

Moving some tickets to 9.2. This is not a promise that I will be working on them.

@mkoeppe mkoeppe modified the milestones: sage-8.0, sage-9.2 May 1, 2020
@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 28, 2020

comment:8

As of #29950, we test it with tox.

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

4 participants