Skip to content

MANIFEST.in: include tests for downstream distros #653

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
Oct 30, 2018

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Sep 16, 2018

Ref: #290

[ci skip]

@pombredanne
Copy link
Contributor

@blueyed the MANIFEST.ini is used strictly by the sdist to control what goes in the tarball or zip archive. The #665 inclusion of the LICENSE file in the setup.cfg is strictly for wheels AFAIK for now.

So that's not great but you need both for now. And unless you plan to never release sdist anymore (which I think would be mistake) you still need both.
And I am not sure how this commit helps with ##290 .

@blueyed
Copy link
Contributor Author

blueyed commented Oct 27, 2018

I've assumed that it has (good) defaults, if the file is absent.

@pombredanne
Copy link
Contributor

@blueyed it usually misses a few files.
One way to check is to use a mini setup.py with from distutils.core import setup and then run a python setup.py sdist --manifest-only and then see if the generated MANIFEST has all that you need.
This is the default https://github.com/python/cpython/blob/master/Lib/distutils/command/sdist.py#L210 and in Pyhon 2.7: https://github.com/python/cpython/blob/2.7/Lib/distutils/command/sdist.py

@blueyed
Copy link
Contributor Author

blueyed commented Oct 30, 2018

diff --git i/setup.py w/setup.py
index 1e551c0..b34b5ee 100755
--- i/setup.py
+++ w/setup.py
@@ -4,7 +4,8 @@
 import codecs
 import os
 
-from setuptools import setup
+# from setuptools import setup
+from distutils.core import setup
 
 
 # Utility function to read the README file.

The difference between master and this PR is then that master has LICENSE and AUTHORS, missing here.

I've amended this PR to readd the file and include tests explicitly.

Thanks for your help!

@blueyed
Copy link
Contributor Author

blueyed commented Oct 30, 2018

@pombredanne
Please ACK if this makes sense.

I've tried to create a tox testenv to use the tests from the sdist, but while it is created as expected (with tests/ on the same level as pytest_django/), tox would not install the tests itself (I have use usedevelop = False) - which makes sense probably, so I've skipped this - sorry, I am obviously not experienced with Python packaging.. ;)

@codecov-io
Copy link

Codecov Report

Merging #653 into master will increase coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #653      +/-   ##
==========================================
+ Coverage   94.38%   94.44%   +0.06%     
==========================================
  Files          33       33              
  Lines        1834     1854      +20     
  Branches      156      161       +5     
==========================================
+ Hits         1731     1751      +20     
  Misses         78       78              
  Partials       25       25
Flag Coverage Δ
#dj110 86.26% <ø> (+0.05%) ⬆️
#dj111 88.72% <ø> (+0.12%) ⬆️
#dj18 87.24% <ø> (+0.05%) ⬆️
#dj19 86.04% <ø> (+0.06%) ⬆️
#dj20 86.47% <ø> (ø) ⬆️
#dj21 82.57% <ø> (+0.07%) ⬆️
#djmaster 82.57% <ø> (+0.07%) ⬆️
#mysql_innodb 86.69% <ø> (ø) ⬆️
#mysql_myisam 86.59% <ø> (+0.05%) ⬆️
#postgres 89.96% <ø> (+0.1%) ⬆️
#py27 91.63% <ø> (+0.09%) ⬆️
#py34 86.04% <ø> (+0.06%) ⬆️
#py35 86.26% <ø> (+0.05%) ⬆️
#py36 87.54% <ø> (+0.13%) ⬆️
#py37 82.57% <ø> (+0.07%) ⬆️
#sqlite 88.67% <ø> (+0.12%) ⬆️
#sqlite_file 86.04% <ø> (+0.06%) ⬆️
Impacted Files Coverage Δ
pytest_django/lazy_django.py 100% <0%> (ø) ⬆️
tests/test_django_settings_module.py 100% <0%> (ø) ⬆️
pytest_django/fixtures.py 97.34% <0%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9804e61...70174d8. Read the comment docs.

@pombredanne
Copy link
Contributor

Acked-by: Philippe Ombredanne [email protected]

@blueyed blueyed merged commit 7ebe329 into pytest-dev:master Oct 30, 2018
@blueyed
Copy link
Contributor Author

blueyed commented Oct 30, 2018

Thanks!

@blueyed blueyed deleted the include-tests branch October 30, 2018 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants