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

0.9.4 on pypi and github (tag) are different #19

Open
toabctl opened this issue May 21, 2013 · 7 comments
Open

0.9.4 on pypi and github (tag) are different #19

toabctl opened this issue May 21, 2013 · 7 comments

Comments

@toabctl
Copy link
Contributor

toabctl commented May 21, 2013

Seems that the tar.gz files from pypi and from github tags for version 0.9.4 are different. sha256sum's are different and the release on pypi doesn't contain the testrun program so when I try to run the tests, I get:

./setup.py test
running test
running egg_info
writing unicodecsv.egg-info/PKG-INFO
writing top-level names to unicodecsv.egg-info/top_level.txt
writing dependency_links to unicodecsv.egg-info/dependency_links.txt
reading manifest file 'unicodecsv.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'unicodecsv.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "./setup.py", line 26, in
'Programming Language :: Python :: Implementation :: CPython',],
File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 138, in run
self.with_project_on_sys_path(self.run_tests)
File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 118, in with_project_on_sys_path
func()
File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 164, in run_tests
testLoader = cks
File "/usr/lib/python2.7/unittest/main.py", line 94, in init
self.parseArgs(argv)
File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
self.module)
File "/usr/lib/python2.7/unittest/loader.py", line 128, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName
module = import('.'.join(parts_copy))
ImportError: No module named runtests

@jdunck
Copy link
Owner

jdunck commented Sep 21, 2015

I imagine people are no longer using this old version -- I'm closing this issue. Please reopen if it still affects you.

@jdunck jdunck closed this as completed Sep 21, 2015
@lfam
Copy link

lfam commented Feb 14, 2016

I have the same issue "ImportError: No module named runtests" using the 0.14.1 PyPi release, but not the GitHub tarball.

I'm building on Python-2.7.10, with setuptools-18.3.1 and unittest2-0.5.1.

Please let me know if I can provide more information about this issue.

@ryanhiebert
Copy link
Collaborator

The tar.gz on PyPI won't be the same as on GitHub. The tags on GitHub are tarballs of the entire repository, but the ones in PyPI are often only the parts needed to run the package. It's quite common for the tests to not be included in the PyPI distribution.

I can't speak for @jdunck, but I personally don't include tests in my Packages on PyPI, so I don't find the use case of running the tests in those tarballs to be one that I want to support.

@lfam
Copy link

lfam commented Feb 14, 2016

My use case is packaging python-unicodecsv for GNU Guix [0].

We always prefer to run the tests of software we distribute. This practice helps ensure the safety of our users and it helps find bugs upstream.

We also prefer to take source code distributions from PyPi when appropriate. It's rare in my experience that PyPi distributions remove test suites. In this case, it sounds like you prefer packagers to use the GitHub tarballs. Is that correct? If so, that's fine.

[0]
http://www.gnu.org/software/guix/

@ryanhiebert
Copy link
Collaborator

I have no opinion on that necessarily. I'm also not the author of this package, so my comments are merely my own. My thinking is simply that PyPI is for users of packages, who don't need the tests, so I don't include them. Is this not an issue that you have had with other Python packages?

@lfam
Copy link

lfam commented Feb 14, 2016

I've only packaged about ~50 Python packages so far, but I've only had this issue with one other package. I've found that many minor Python programs are only distributed through PyPi, which means that distros have to use PyPi as the source of their packages. Also, PyPi provides a consistent interface across packages which makes it easy to do things automatically generate packages and package updates; GitHub doesn't.

I think that distros running tests is very important, btw.

Like I said, I'm happy to base our package on the GitHub distribution. I think I was confused by @jdunck's earlier comment. I didn't realize this was a WONTFIX.

@ryanhiebert
Copy link
Collaborator

The issue was considered outdated, not necesarily invalid. I'm going to open this up, so @jdunck can give comment when he has the time.

@ryanhiebert ryanhiebert reopened this Feb 14, 2016
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

No branches or pull requests

4 participants