Skip to content

In setup.py, inline the packages that need to be installed into setup(). #14170

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

Merged
merged 1 commit into from
May 27, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented May 8, 2019

... instead of hiding that behind a function call in setupext.

(See also #13542 which does the same with {install,setup}_requires.)

Also always install the test source files -- setting tests = False in
setup.cfg now only ignores the test data (this is also consistent with
the contents of `matplotlib/tests/init.py which is clearly intended
to handle the case where the test source files are installed but not the
baseline images). This is done for simplicity of implementation and
also to make it possibly easier to separately install the baseline
images (as these are now pure "data") in the future (WIP in #11732).

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added the Build label May 8, 2019
@tacaswell tacaswell added this to the v3.2.0 milestone May 11, 2019
@tacaswell
Copy link
Member

Deleted my comment because I failed to read before I typed.

Given the discussion we had with the Arch packagers in #13993 is this going to cause the same problem?

Having clean data-only wheels for the test data does seem like a good carrot.

@anntzer
Copy link
Contributor Author

anntzer commented May 12, 2019

We can ping @ArchangeGabriel here to ask :) This time it is definitely intentional to always install the test source files, just leaving the baseline images optional; I think if downstream packagers want to also remove the tests they can just yank them out a posteriori.

@ArchangeGabriel
Copy link
Contributor

It’s fine, we can indeed just remove the test files afterwards if they are not spread over hundreds of directories. ;)

Also since we don’t pass the baseline images comparisons (because of different freetype), this change could actually leads to simplification of our building scripts if testing skip baseline images tests when they are missing.

@anntzer
Copy link
Contributor Author

anntzer commented May 12, 2019

You can just rm **/tests/, I think. Not sure what the current behavior is on missing baseline images, but I guess we can make them just ignored in that case, indeed (not in this PR).

@ArchangeGabriel
Copy link
Contributor

Ignoring the image tests would be awesome because it means we would actually be able to automatically and easily verify no other tests failed. :)

@efiring efiring requested a review from QuLogic May 26, 2019 00:09
... instead of hiding that behind a function call in setupext.

Also always install the test source files -- setting `tests = False` in
setup.cfg now only ignores the test data (this is also consistent with
the contents of `matplotlib/tests/__init__.py which is clearly intended
to handle the case where the test source files are installed but not the
baseline images).  This is done for simplicity of implementation and
also to make it possibly easier to separately install the baseline
images (as these are now pure "data") in the future.
@QuLogic QuLogic merged commit a930461 into matplotlib:master May 27, 2019
@anntzer anntzer deleted the inline-packages branch May 27, 2019 19:43
@ArchangeGabriel
Copy link
Contributor

I think that this part of setup.cfg should have been updated to say that what is controlled here is only about data, not actually packages (tests being installed anyway now). What is your opinion on this?

@anntzer
Copy link
Contributor Author

anntzer commented Oct 22, 2019

Sounds fair, do you want to open a PR for that?

@ArchangeGabriel
Copy link
Contributor

Also, currently having tests = False outputs tests: no [skipping due to configuration] but that does not actually forbid to run tests. So yes I might open a PR. Should I target master first and then backport to 3.2.x?

@anntzer
Copy link
Contributor Author

anntzer commented Oct 22, 2019

yes

@ArchangeGabriel
Copy link
Contributor

OK, made some attempt at #15480.

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

Successfully merging this pull request may close these issues.

5 participants