@@ -179,7 +179,7 @@ def test_get_extra_from_requires_dist():
179
179
def dask_sdist_metadata ():
180
180
config = Configuration (name = "dask" )
181
181
return get_sdist_metadata (
182
- "https://pypi.io /packages/source/d/dask/dask-2022.6.1.tar.gz" ,
182
+ "https://pypi.org /packages/source/d/dask/dask-2022.6.1.tar.gz" ,
183
183
config ,
184
184
)
185
185
@@ -283,7 +283,7 @@ def test_compose_test_section_with_console_scripts():
283
283
config = Configuration (name = "pytest" , version = "7.1.2" )
284
284
metadata1 = get_pypi_metadata (config )
285
285
metadata2 = get_sdist_metadata (
286
- "https://pypi.io /packages/source/p/pytest/pytest-7.1.2.tar.gz" , config
286
+ "https://pypi.org /packages/source/p/pytest/pytest-7.1.2.tar.gz" , config
287
287
)
288
288
metadata = merge_pypi_sdist_metadata (metadata1 , metadata2 , config )
289
289
test_requirements = []
@@ -604,7 +604,7 @@ def test_get_sha256_from_pypi_metadata():
604
604
def test_injection_distutils (name ):
605
605
config = Configuration (name = "hypothesis" )
606
606
data = get_sdist_metadata (
607
- "https://pypi.io /packages/source/h/hypothesis/hypothesis-5.5.1.tar.gz" ,
607
+ "https://pypi.org /packages/source/h/hypothesis/hypothesis-5.5.1.tar.gz" ,
608
608
config ,
609
609
)
610
610
assert sorted (data ["install_requires" ]) == sorted (
@@ -621,7 +621,7 @@ def test_injection_distutils(name):
621
621
def test_injection_distutils_pytest ():
622
622
config = Configuration (name = "pytest" , version = "5.3.2" )
623
623
data = get_sdist_metadata (
624
- "https://pypi.io /packages/source/p/pytest/pytest-5.3.2.tar.gz" , config
624
+ "https://pypi.org /packages/source/p/pytest/pytest-5.3.2.tar.gz" , config
625
625
)
626
626
assert sorted (data ["install_requires" ]) == sorted (
627
627
[
@@ -644,31 +644,42 @@ def test_injection_distutils_pytest():
644
644
645
645
646
646
def test_injection_distutils_compiler_gsw ():
647
- config = Configuration (name = "gsw" , version = "3.3.1 " )
647
+ config = Configuration (name = "gsw" , version = "3.6.19 " )
648
648
data = get_sdist_metadata (
649
- "https://pypi.io /packages/source/g/gsw/gsw-3.3.1 .tar.gz" , config
649
+ "https://pypi.org /packages/source/g/gsw/gsw-3.6.19 .tar.gz" , config
650
650
)
651
651
assert data .get ("compilers" ) == ["c" ]
652
- assert data ["packages " ] == [ "gsw" ]
652
+ assert data ["name " ] == "gsw"
653
653
654
654
655
655
def test_injection_distutils_setup_reqs_ensure_list ():
656
656
pkg_name , pkg_ver = "pyinstaller-hooks-contrib" , "2020.7"
657
657
config = Configuration (name = pkg_name , version = pkg_ver )
658
658
data = get_sdist_metadata (
659
- f"https://pypi.io /packages/source/p/{ pkg_name } /{ pkg_name } -{ pkg_ver } .tar.gz" ,
659
+ f"https://pypi.org /packages/source/p/{ pkg_name } /{ pkg_name } -{ pkg_ver } .tar.gz" ,
660
660
config ,
661
661
)
662
662
assert data .get ("setup_requires" ) == ["setuptools >= 30.3.0" ]
663
663
664
664
665
665
def test_merge_pypi_sdist_metadata ():
666
- config = Configuration (name = "gsw" , version = "3.3.1 " )
666
+ config = Configuration (name = "gsw" , version = "3.6.19 " )
667
667
pypi_metadata = get_pypi_metadata (config )
668
668
sdist_metadata = get_sdist_metadata (pypi_metadata ["sdist_url" ], config )
669
669
merged_data = merge_pypi_sdist_metadata (pypi_metadata , sdist_metadata , config )
670
670
assert merged_data ["compilers" ] == ["c" ]
671
- assert sorted (merged_data ["setup_requires" ]) == sorted (["numpy" ])
671
+ assert sorted (merged_data ["setup_requires" ]) == sorted (
672
+ [
673
+ "build" ,
674
+ 'numpy<3,>=2.0.0rc1; python_version >= "3.9"' ,
675
+ 'oldest-supported-numpy; python_version < "3.9"' ,
676
+ "pip>9.0.1" ,
677
+ "setuptools>=42" ,
678
+ "setuptools_scm[toml]>=3.4" ,
679
+ "wheel" ,
680
+ "python >=3.8" ,
681
+ ]
682
+ )
672
683
673
684
674
685
def test_update_requirements_with_pin ():
@@ -809,13 +820,22 @@ def test_download_pkg_sdist(pkg_pytest):
809
820
810
821
def test_ciso_recipe ():
811
822
recipe = GrayskullFactory .create_recipe (
812
- "pypi" , Configuration (name = "ciso" , version = "0.1.0 " )
823
+ "pypi" , Configuration (name = "ciso" , version = "0.2.2 " )
813
824
)
814
825
assert sorted (recipe ["requirements" ]["host" ]) == sorted (
815
- ["cython" , "numpy" , "pip" , "python" ]
826
+ [
827
+ "cython >=3" ,
828
+ "numpy >=2.0.0rc1" ,
829
+ "oldest-supported-numpy" ,
830
+ "pip" ,
831
+ "python >=3.9" ,
832
+ "setuptools >=41.2" ,
833
+ "setuptools-scm" ,
834
+ "wheel" ,
835
+ ]
816
836
)
817
837
assert sorted (recipe ["requirements" ]["run" ]) == sorted (
818
- ["cython" , "python" , " <{ pin_compatible('numpy') }}" ]
838
+ ["<{ pin_compatible('numpy') }}" , "oldest-supported-numpy" , "python >=3.9 " ]
819
839
)
820
840
assert recipe ["test" ]["commands" ] == ["pip check" ]
821
841
assert recipe ["test" ]["requires" ] == ["pip" ]
@@ -1112,7 +1132,7 @@ def test_recipe_extension():
1112
1132
recipe = create_python_recipe ("azure-identity=1.3.1" )[0 ]
1113
1133
assert (
1114
1134
recipe ["source" ]["url" ]
1115
- == "https://pypi.io /packages/source/{{ name[0] }}/{{ name }}/"
1135
+ == "https://pypi.org /packages/source/{{ name[0] }}/{{ name }}/"
1116
1136
"azure-identity-{{ version }}.zip"
1117
1137
)
1118
1138
@@ -1288,6 +1308,11 @@ def test_notice_file_different_licence():
1288
1308
assert recipe ["about" ]["license" ] in ["MIT AND Apache-2.0" , "Apache-2.0 AND MIT" ]
1289
1309
1290
1310
1311
+ # Need to find another package for this test
1312
+ @pytest .mark .skipif (
1313
+ sys .version_info >= (3 , 12 ),
1314
+ reason = "consolemd setup.py requires lower than python 3.12" ,
1315
+ )
1291
1316
def test_console_script_toml_format ():
1292
1317
recipe , _ = create_python_recipe ("consolemd" , version = "0.5.1" )
1293
1318
assert recipe ["build" ]["entry_points" ] == ["consolemd = consolemd.cli:cli" ]
0 commit comments