Skip to content

Commit

Permalink
DEV: Fixup requirements.txt (pandas-dev#29445)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger authored Nov 7, 2019
1 parent 6d9b476 commit bd15d12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
numpy>=1.15
python==3.7
python-dateutil>=2.6.1
pytz
asv
Expand Down
8 changes: 4 additions & 4 deletions scripts/generate_pip_deps_from_conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import yaml

EXCLUDE = {"python=3"}
EXCLUDE = {"python"}
RENAME = {"pytables": "tables", "pyqt": "pyqt5", "dask-core": "dask"}


Expand All @@ -33,15 +33,15 @@ def conda_package_to_pip(package):
- A package requiring a specific version, in conda is defined with a single
equal (e.g. ``pandas=1.0``) and in pip with two (e.g. ``pandas==1.0``)
"""
if package in EXCLUDE:
return

package = re.sub("(?<=[^<>])=", "==", package).strip()

for compare in ("<=", ">=", "=="):
if compare not in package:
continue

pkg, version = package.split(compare)
if pkg in EXCLUDE:
return

if pkg in RENAME:
return "".join((RENAME[pkg], compare, version))
Expand Down

0 comments on commit bd15d12

Please sign in to comment.