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 #156

Closed
stonebig opened this Issue Sep 18, 2014 · 6 comments

Comments

2 participants
@stonebig

stonebig commented Sep 18, 2014

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

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
@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Sep 18, 2014

Owner

Hi,

I have no problem with that in principle if it will upload a tar.gz and whi file at the same time and I'm pretty sure it does.

However, the changes above aren't enough to get it working.

~/JohnPython/XlsxWriter (master)$ cat setup.cfg
[wheel]
universal = 1


$ python setup.py sdist bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_wheel'

I thought that changing from distutils to setuptools would fix this but it doesn't:

$
~/Work/Python/XlsxWriter (master)$ git diff
diff --git a/setup.py b/setup.py
index 5d31018..fe239df 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-from distutils.core import setup
+from setuptools import setup

 setup(
     name='XlsxWriter',
$ python setup.py sdist bdist_wheel
Traceback (most recent call last):
  File "setup.py", line 23, in <module>
    'Programming Language :: Python :: 3.4',
...
NameError: name 'sys_platform' is not defined

So, twenty minutes later this has moved from a "nice to have" to a minor pita.

If you can demonstrate a painless way of implementing it then I'll add it.

Regards,

John

Owner

jmcnamara commented Sep 18, 2014

Hi,

I have no problem with that in principle if it will upload a tar.gz and whi file at the same time and I'm pretty sure it does.

However, the changes above aren't enough to get it working.

~/JohnPython/XlsxWriter (master)$ cat setup.cfg
[wheel]
universal = 1


$ python setup.py sdist bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_wheel'

I thought that changing from distutils to setuptools would fix this but it doesn't:

$
~/Work/Python/XlsxWriter (master)$ git diff
diff --git a/setup.py b/setup.py
index 5d31018..fe239df 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-from distutils.core import setup
+from setuptools import setup

 setup(
     name='XlsxWriter',
$ python setup.py sdist bdist_wheel
Traceback (most recent call last):
  File "setup.py", line 23, in <module>
    'Programming Language :: Python :: 3.4',
...
NameError: name 'sys_platform' is not defined

So, twenty minutes later this has moved from a "nice to have" to a minor pita.

If you can demonstrate a painless way of implementing it then I'll add it.

Regards,

John

@jmcnamara jmcnamara self-assigned this Sep 18, 2014

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Sep 18, 2014

Owner

Update: upgrading setuptools fixes the above issue.

So, I'll add this in the next release.

Owner

jmcnamara commented Sep 18, 2014

Update: upgrading setuptools fixes the above issue.

So, I'll add this in the next release.

@stonebig

This comment has been minimized.

Show comment
Hide comment
@stonebig

stonebig Sep 18, 2014

Thanks a lot.
When is the next release ?

stonebig commented Sep 18, 2014

Thanks a lot.
When is the next release ?

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Sep 18, 2014

Owner

There is not projected date at the moment and no pressing features to go in. The earliest will probably be October sometime.

Owner

jmcnamara commented Sep 18, 2014

There is not projected date at the moment and no pressing features to go in. The earliest will probably be October sometime.

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Sep 29, 2014

Owner

Implemented in version 0.5.8. Closing.

Owner

jmcnamara commented Sep 29, 2014

Implemented in version 0.5.8. Closing.

@jmcnamara jmcnamara closed this Sep 29, 2014

@stonebig

This comment has been minimized.

Show comment
Hide comment
@stonebig

stonebig commented Sep 29, 2014

thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment