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

Add option to create tar.gz files. #76

Closed
yesimon opened this issue Feb 21, 2015 · 7 comments
Closed

Add option to create tar.gz files. #76

yesimon opened this issue Feb 21, 2015 · 7 comments

Comments

@yesimon
Copy link

yesimon commented Feb 21, 2015

I see in this line that maybe python 2.4 has some issues with creating tar.gz files

# Due to a bug in python24, tar files might get corrupted on READ.

However since that's a really old python by now, can we add an option to upload tar files to pypi?

@reinout
Copy link
Collaborator

reinout commented Feb 22, 2015

The current option forces setuptools to generate a zipfile. I guess that's not really needed anymore.

So... instead of adding a tar option, I'd rather say "we don't need to pass the zip option anymore". Setuptools will then use some default, which is probably tgz files.

@mauritsvanrees: tgz is probably fine now?

@mauritsvanrees
Copy link
Member

Probably okay. I started writing that we should still check for the Python version: if it is 2.4.x we should still use zip. But looking at our setup.py we only support Python 2.6 and 2.7. So should be okay to remove our zip default.

There is a nagging doubt in the back of my mind, because I had some problems recently with a tarball that I created on my Mac and that could not be extracted on some Linux server. Problem was that I was using the Mac standard /usr/bin/tar which is bsdtar. Switching to a port install of GNU tar fixed it. But this was with a git archive command, not with zest.releaser or setuptools. setuptools may be using some internal or base Python tar version. Not sure. But as two data points on PyPI: for setuptools both .zip and .tgz are uploaded, and for pip only .tgz is uploaded. I guess we would know if there were problems with .tgz and recent Python versions.

Long story short: should be okay. :-)

BTW, I think whether zip or targz or something else is used by default depends on the OS. Indeed, see https://docs.python.org/2/distutils/sourcedist.html. If you want to override the default behavior you can add a setup.cfg to your Python project and put this in it, with one or more formats:

[sdist]
formats = zip,gztar

@reinout
Copy link
Collaborator

reinout commented Mar 18, 2015

Hm... I am getting all sorts of hard-to-debug doctest failures. The common problem.
Note: I made the change on master...

@yesimon
Copy link
Author

yesimon commented Mar 18, 2015

Is this related to tgz files?

@mauritsvanrees
Copy link
Member

Yep, the expected sometimes-I-fail-sometimes-I-dont related to 'tags dir does not exist' where we try to answer 'no, do not create it' first, and it creates it anyway. Something like that.

@reinout
Copy link
Collaborator

reinout commented Mar 18, 2015

Ok, tests are OK again.

Released as 3.56 and.... it is a tgz automatically :-)
https://pypi.python.org/packages/source/z/zest.releaser/zest.releaser-3.56.tar.gz

@mauritsvanrees
Copy link
Member

@yesimon: the 'Yep' was for Reinout. As answer to you: No, the doctest failures are not related to tgz files, they have been here for a while, sometimes failing sometimes not.... :-(

See https://travis-ci.org/zestsoftware/zest.releaser/builds/54873008

@reinout reinout mentioned this issue Sep 4, 2015
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

3 participants