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

Cannot create a wheel from an sdist #276

Closed
Themanwithoutaplan opened this issue Nov 2, 2018 · 3 comments
Closed

Cannot create a wheel from an sdist #276

Themanwithoutaplan opened this issue Nov 2, 2018 · 3 comments
Labels

Comments

@Themanwithoutaplan
Copy link

Because I want exclude quite a lot of files from the dist I always create an sdist. I haven't worked with wheel very often but have previously managed to create a wheel from the sdist but not today.

I have created an sdist zip (being able to work with .tgz would be nicht, but okay)

This is the error message I get:

(openpyxl) Fuchsia:openpyxl charlieclark$ python setup.py sdist --formats=zip
(openpyxl) Fuchsia:openpyxl charlieclark$ wheel convert dist/openpyxl-2.5.10.zip
Traceback (most recent call last):
  File "/Users/charlieclark/Projects/openpyxl/bin/wheel", line 11, in <module>
    sys.exit(main())
  File "/Users/charlieclark/Projects/openpyxl/lib/python3.5/site-packages/wheel/cli/__init__.py", line 82, in main
    args.func(args)
  File "/Users/charlieclark/Projects/openpyxl/lib/python3.5/site-packages/wheel/cli/__init__.py", line 35, in convert_f
    convert(args.files, args.dest_dir, args.verbose)
  File "/Users/charlieclark/Projects/openpyxl/lib/python3.5/site-packages/wheel/cli/convert.py", line 267, in convert
    conv(installer, dest_dir)
  File "/Users/charlieclark/Projects/openpyxl/lib/python3.5/site-packages/wheel/cli/convert.py", line 171, in wininst2wheel
    info = parse_wininst_info(os.path.basename(path), egginfo_name)
  File "/Users/charlieclark/Projects/openpyxl/lib/python3.5/site-packages/wheel/cli/convert.py", line 128, in parse_wininst_info
    raise ValueError("Egg info filename %s is not valid" % (egginfo_name,))
ValueError: Egg info filename openpyxl-2.5.10/openpyxl/openpyxl.egg-info/PKG-INFO is not valid

Maybe it's just me being stupid but I really don't see why this is happening.

@agronholm
Copy link
Contributor

The wheel convert command only converts eggs or wininst installers into wheels, not sdists. Are you sure you've read the documentation? Why are you not using setup.py bdist_wheel in the first place?

@Themanwithoutaplan
Copy link
Author

I can't use bdist_wheel because it doesn't respect the manifest and is creating a wheel 4 times the size of the sdist.

@agronholm
Copy link
Contributor

I'm closing this as invalid due to incorrect use of wheel convert, but if you can point me to your project, I can take a look and offer suggestions. One suggestion I can offer right away is the new wheel pack command which you can use to repack the wheel after you've trimmed the end result of bdist_wheel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants