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

[Question] zip_safe setting if Wheels #19

Closed
Kristinita opened this issue Feb 7, 2018 · 4 comments
Closed

[Question] zip_safe setting if Wheels #19

Kristinita opened this issue Feb 7, 2018 · 4 comments

Comments

@Kristinita
Copy link

Kristinita commented Feb 7, 2018

1. Briefly

I'm not sure, is the parameter zip_safe needs, if developer build package use Wheels.

2. Steps to reproduce

I create my Python package → I build my package, use Wheels:

python setup.py bdist_wheel

I publish my package to PyPI use Twine:

twine upload dist/*

I install my package use pip:

pip install <my_package>

3. Essence of the question

If I build my package, use python setup.py sdist, zip_safe parameter have a meaning:

If zip_safe = True:

    package add to my site-packages directory, packed to .egg format;

else:

    package add to site-packages directory unpacked.

But if I build my package, use python setup.py sdist, I get same behavior for zip_safe true and false or if I don't have zip_safe parameter. Package add to site-packages directory unpacked.

4. pyroma

If I have line zip_safe = True or zip_safe = False:

D:\SashaCanelo>pyroma .
------------------------------
Checking .
Registered VCS backend: git
Registered VCS backend: hg
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect

Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect

Registered VCS backend: svn
Registered VCS backend: bzr
Found sashacanelo
------------------------------
Final rating: 10/10
Your cheese is so fresh most people think it's a cream: Mascarpone
------------------------------

else:

D:\SashaCanelo>pyroma .
------------------------------
Checking .
Registered VCS backend: git
Registered VCS backend: hg
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect

Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect

Registered VCS backend: svn
Registered VCS backend: bzr
Found sashacanelo
------------------------------
You are using Setuptools or Distribute but do not specify if this package is zip_safe or not. You should specify it, as it defaults to True, which you probably do not want.
------------------------------
Final rating: 9/10
Cottage Cheese
------------------------------

But I think, that zip_safe parameter is excessive in this case.

Thanks.

@jwilk
Copy link
Contributor

jwilk commented Aug 11, 2018

I'm not sure, is the parameter zip_safe needs, if developer build package use Wheels.

zip_safe doesn't affect wheels, but not everybody uses wheels.
It does make a difference when the user installs the software using python setup.py install.

Admittedly, pyroma does poor job at explaining why you should set zip_safe. :-/
It says that the default is probably not what you want, but doesn't say why it's not.

@regebro
Copy link
Owner

regebro commented Aug 15, 2018

Well, the reason is that it default to being zip safe, but if it isn't that means the installation doesn't work.

@regebro
Copy link
Owner

regebro commented Aug 16, 2018

Actually, I had a vague feeling that maybe the zip_safe default had changed, and it did, so this test isn't relevant any more. I'll remove it.

@regebro regebro closed this as completed Aug 16, 2018
@Kristinita
Copy link
Author

@regebro , please, publish version with 017d0a5 to PyPI. I steel get error as in my first post.

Thanks.

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