Skip to content

Commit

Permalink
Merge pull request #2880 from mingwandroid/skeleton-pypi
Browse files Browse the repository at this point in the history
skeleton (pypi): Avoid checking for '~' in NoneType when spec parse f…
  • Loading branch information
msarahan authored May 11, 2018
2 parents 70ddd6c + e549768 commit 106cb5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conda_build/skeletons/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,13 +733,13 @@ def get_package_metadata(package, d, data, output_dir, python_version, all_extra
dep = dep.split('#')[0].strip()
if dep: # ... and empty (or comment only) lines
spec = spec_from_line(dep)
if spec is None:
sys.exit("Error: Could not parse: %s" % dep)
if '~' in spec:
version = spec.split()[-1]
tilde_version = '~ {}' .format(version)
pin_compatible = convert_version(version)
spec = spec.replace(tilde_version, pin_compatible)
if spec is None:
sys.exit("Error: Could not parse: %s" % dep)
deps.append(spec)

if 'setuptools' in deps:
Expand Down

0 comments on commit 106cb5f

Please sign in to comment.