Skip to content

Commit 556f5bc

Browse files
FHaasetm9k1
authored andcommitted
fix renaming of packages (pandas-dev#23740)
Signed-off-by: Fabian Haase <[email protected]>
1 parent 0cd736c commit 556f5bc

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

requirements-dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ numexpr>=2.6.1
2929
openpyxl
3030
pyarrow>=0.7.0
3131
pymysql
32-
pytables>=3.4.2
32+
tables>=3.4.2
3333
pytest-cov
3434
pytest-xdist
3535
s3fs

scripts/generate_pip_deps_from_conda.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,19 @@ def conda_package_to_pip(package):
3636
if package in EXCLUDE:
3737
return
3838

39-
if package in RENAME:
40-
return RENAME[package]
39+
package = re.sub('(?<=[^<>])=', '==', package).strip()
40+
for compare in ('<=', '>=', '=='):
41+
if compare not in package:
42+
continue
4143

42-
return re.sub('(?<=[^<>])=', '==', package).strip()
44+
pkg, version = package.split(compare)
45+
46+
if pkg in RENAME:
47+
return ''.join((RENAME[pkg], compare, version))
48+
49+
break
50+
51+
return package
4352

4453

4554
def main(conda_fname, pip_fname, compare=False):

0 commit comments

Comments
 (0)