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

Wheel packaging format for pypi.org #288

Closed
stonebig opened this issue Sep 11, 2014 · 7 comments
Closed

Wheel packaging format for pypi.org #288

stonebig opened this issue Sep 11, 2014 · 7 comments

Comments

@stonebig
Copy link
Contributor

Would it be possible to get a .whl universal package on Pypi ?

If I'm right, it's just a matter of adding a setup.cfg file at root level with

[wheel]
universal = 1

and then doing this to upload to pypi

python setup.py sdist bdist_wheel upload -r pypi

Indeed, I'm getting an error when trying to use seaborn-0.4.0.tar.gz to build a winpython distribution
having a .whl package would probably remove my issue
(of repacking seaborn into a winpython distribution)

@mwaskom
Copy link
Owner

mwaskom commented Sep 11, 2014

I don't really know anything about wheels, although I understand it makes life easier for people. I'm of course not opposed, but it will take me some time to figure out exactly what to do.

I thought wheels were mostly beneficial in the case where a package has compiled code, though, and seaborn is pure python. So that might not be the issue you're seeing?

@twiecki
Copy link

twiecki commented Sep 12, 2014

conda packages would also be very useful. Should be pretty simple and I can certainly help with that.

@stonebig
Copy link
Contributor Author

Hi @mwaskom

In current state of the wheel, I would say the most immediate benefit is for universal source packages.

  • wheel source packages are smaller (less bandwith to upload)
  • wheel source packages are less client-cpu intensive to install (at least in my case)

You caused my issue with the

check_dependencies()

of your seaborn-4.4.0 setup.py instead of former seaborn-0.3.1 setup.py

install_requires=["pandas"] 

DETAIL EXPLANATION
I'm packaging a Winpython distribution, that includes your awesome work.

Winpython , when trying to include a SOURCE package .tar.gz or .zip
step1- un-pack the package in a "white room" aera ,
step2- create from it a binary installer via a "python setup.py build --plat-name=win32 bdist_wininst" (in the "white room" aera context)
step3- then un-pack the binary installer in the 'final' pre-distribution.

==> With check_dependencies() , step2 can never succeeds

Wheel Advantage1 = step1 and step2 are already done (also reduces the carbon footprint)
Wheel Advantage 2 = the setup.py in step2 doesn't fail trying to do strange things, or trying to do controls that are not disconnectable

To include nevertheless seaborn-0.4.0, I'm forced to manually

  • unpack it
  • tag the check_dependencies() line of setup.py
        do_not_mess = True  # check_dependencies()
  • repack it as a .zip,
  • put back this "tainted" seaborn package manually in the source package queue of my build system.

With a wheel seaborn package

  • there wouldn't be any setup.py messing in step3
  • I can disable the dependencies checks with a nice
.\python .\Scripts\pip-script.py install --no-deps seaborn-0.4.1-py2.py3-none-any.whl

... so my request.

I think wheel is 75% of conda functionnality, but for 100% of the (windows/apple) Python world.
(so it's a huge step forward, as conda is for sure great, and previous situation ugly)

@mwaskom
Copy link
Owner

mwaskom commented Sep 12, 2014

Thanks that makes a lot of sense. You can read #169 and #285 for a full explanation of the changes in setup.py; the short version is that some strange design choices in pip force a tradeoff between making life easier for average users and making life easier for people trying to build distributions.

I'll try to look more into wheels this weekend.

@stonebig
Copy link
Contributor Author

The way that works for me is to install every package (carefully listed) with no checks, then turn the light on.
It's certain (or advertised) conda is designed to solve 'all' kind of dependancies.

As far as I could understand the sometimes 'not super-clear' wheel documentation, we get about the same result as conda for a chain of pure python source packages.

@stonebig
Copy link
Contributor Author

Hi,

maybe I've been too simplifying using https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/

Apparently Travis needs sometime a requirements.txt file reading https://caremad.io/blog/setup-vs-requirement/

indeed, on JuliaLang/pyjulia example

https://travis-ci.org/JuliaLang/pyjulia/jobs/35193438 , a requirements.txt file is claimed
(line 595 of report )

# This is an implicit value, here for clarity
--index-url https://pypi.python.org/simple/

it's better after (even if only cosmetic)
https://travis-ci.org/JuliaLang/pyjulia/jobs/35193438

Maybe it's a false warning, even a bad idea, but as I fell over this, I point you to the documentation from Donald Stufft (the reference guy)

@stonebig
Copy link
Contributor Author

stonebig commented Nov 6, 2014

Problem found, and not what I thought.

Your setup check does "import matplotlib", which in recent version, needs "six" to be initialized.
Unfortunately :

  • "six" is not included in Christoph Gohlke matplotlib binary package,
  • winpython installs packages by default in alphabetical order and "six" is after "seaborn" .

==> "six" will be now part of my "priority install packages", so issue is fixed.

@stonebig stonebig closed this as completed Nov 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants