Open RoccoCloudCycle opened 2 years ago
in get_package_info() when a version is specified the
url = "https://pypi.org/pypi/{}/{}/json".format(package_name, version)
will return a json response that doesn't contain "releases" field, so the following try block will always fails:
try:
version_info = next(
i for i in info["releases"][version] if i["packagetype"] == "sdist"
)
except:
raise Exception("No sdist package can be found.")
it should be used always
url = "https://pypi.org/pypi/{}/json".format(package_name)
plus line
version = info["info"]["version"]
will always override our desired version with the latest one
Replicates even with pipoe
, using pipoe==2019.11
$ pipoe --package pipoe --version 2019.11
Gathering info:
pipoe==2019.11
Failed to translate license:
Please enter a valid license name:
[ERROR] Failed to gather pipoe (No sdist package can be found.)
Generating recipes:
PREFERRED_VERSIONS are available in: ./python-versions.inc
I can confirm that this breaks pretty confusingly, especially when translating a requirement.txt create by pip freeze, etc.
The recipes can be created easily by removing the versions or calling on command line without specifying a version.
when I specify the version I want, even if it is the latest one, pipoe always fail with (No sdist package can be found error)
I can run the command without specifying the version, but for libraries that depend on specific version is problematic. For example, I can't install awsiotsdk, even without specifying the version, because it depends explicitly on awscrt v.0.14.0: