nix-community / nixpkgs-pytools

Tools for removing the tedious nature of creating nixpkgs derivations [maintainer=@costrouc]
MIT License
45 stars 9 forks source link

Error if a package only has wheels in pypi #15

Open alexvorobiev opened 4 years ago

alexvorobiev commented 4 years ago

faiss is an example:

$ python-package-init faiss
Fetching package="faiss" version="stable"
Traceback (most recent call last):
  File "/nix/store/zaz1rix5k7svlxjrbdl7q3sx822xna73-python3.7-nixpkgs-pytools-1.3.0/bin/.python-package-init-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/5gfkpdxiabdnh8q5gcm79ln9qamqr47r-python3-3.7.6-env/lib/python3.7/site-packages/nixpkgs_pytools/python_package_init.py", line 34, in main
    args.nixpkgs_root,
  File "/nix/store/5gfkpdxiabdnh8q5gcm79ln9qamqr47r-python3-3.7.6-env/lib/python3.7/site-packages/nixpkgs_pytools/python_package_init.py", line 66, in initialize_package
    metadata = package_json_to_metadata(data, package_name, version)
  File "/nix/store/5gfkpdxiabdnh8q5gcm79ln9qamqr47r-python3-3.7.6-env/lib/python3.7/site-packages/nixpkgs_pytools/python_package_init.py", line 98, in package_json_to_metadata
    "no source distribution (sdist) found for {package_name}:{package_version}".format(package_name=package_name, package_version=package_version)
ValueError: no source distribution (sdist) found for faiss:1.5.3
makefu commented 4 years ago

can confirm, this is quite unfortunate. @costrouc do you have an idea how to proceed here? maybe at least we could write out a more useful error message.

costrouc commented 4 years ago

Yeah this should be fairly easy to implement. I can't promise I have the time right now to implement that. Wheels actually have more information on them than sdists to we should be able to get more accurate requiements

Pandapip1 commented 6 months ago

Any updates?