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

tests are not included in release tarballs #201

Closed
danc86 opened this Issue Apr 23, 2015 · 7 comments

Comments

Projects
None yet
5 participants
@danc86

danc86 commented Apr 23, 2015

Please include the tests directory in release tarballs. You can probably just add:

include tests

to MANIFEST.in. This will make it easy for downstream distro packagers to run the tests as part of the build process.

You might also consider adding the docs and examples to the tarballs in the same way.

@philtay

This comment has been minimized.

Contributor

philtay commented May 3, 2015

In theory, including the tests in realease tarballs is good practice, but - in practice - it is not.
If you want to automate the build process for marshmallow I suggest you to download it from here

https://github.com/marshmallow-code/marshmallow/releases

instead of using PyPI. These tarballs include everything, source, tests, docs, etc.

If you are building packages in an isolated environment, using something like pbuilder, you can follow these (automatable) steps:

  • install the build-time dependencies (using pip) listed here /dev-requirements.txt and here /docs/requirements.txt
  • run the tests using tox from the root directory
  • build the docs using /tasks.py
  • create deb, rpm or whatever

A cool thing you can do is to contribute a Dockerfile for this project that automatically builds distro packages in a clean environment and put them in a volume.

@danc86

This comment has been minimized.

danc86 commented May 4, 2015

In theory, including the tests in realease tarballs is good practice, but - in practice - it is not.

Out of curiosity, why?

@davidism

This comment has been minimized.

Contributor

davidism commented May 4, 2015

Because the distributions on PyPI have already been built, even if they are just sdists (tarballs). If you're creating a package for a Linux distro, you should be building the package from the actual source, in your distro's environment. Basically, the op is confusing a source distribution with the source.

@danc86

This comment has been minimized.

danc86 commented May 7, 2015

Conventionally source tarballs do include all sources, even tests and docs and examples.

I wasn't suggesting to change the existing published tarballs, only to update MANIFEST.in so that future sdists will include the tests.

Anyway if you don't want to do that for some reason that's okay, I can just use the Github generated tarballs as suggested above.

Here's the Fedora package review which I just filed, if you're interested: https://bugzilla.redhat.com/show_bug.cgi?id=1219288

@Jenselme

This comment has been minimized.

Jenselme commented Jun 20, 2015

Because the distributions on PyPI have already been built, even if they are just sdists (tarballs).

This is not a big deal, we can easily remove the egg-info. Moreover, it is easier to use pypi to get the soruces (github URLs are known to change from time to time). In fedora (and I guess in many other linux distros), many python packages are built from pypi. So I also think that tests and docs should be included in the tarballs. But, this is not a big issue.

@sloria

This comment has been minimized.

Member

sloria commented Aug 25, 2015

This is a minimal change, and if it makes anyone's life easier, I'm happy to do it.

@sloria sloria closed this Aug 25, 2015

sloria added a commit that referenced this issue Aug 25, 2015

@danc86

This comment has been minimized.

danc86 commented Aug 25, 2015

Thanks!

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