@@ -788,6 +788,45 @@ def test_editable_install__local_dir_setup_requires_with_pyproject(
788
788
script .pip ("install" , "--find-links" , shared_data .find_links , "-e" , local_dir )
789
789
790
790
791
+ def test_install_pre__setup_requires_with_pyproject (
792
+ script : PipTestEnvironment , shared_data : TestData , common_wheels : Path
793
+ ) -> None :
794
+ """
795
+ Test installing with a pre-release build dependency declared in both
796
+ setup.py and pyproject.toml.
797
+
798
+ https://github.com/pypa/pip/issues/10573
799
+ """
800
+ depends_package = "prerelease_dependency"
801
+ depends_path = create_basic_wheel_for_package (script , depends_package , "1.0.0a1" )
802
+
803
+ local_dir = script .scratch_path .joinpath ("temp" )
804
+ local_dir .mkdir ()
805
+ pyproject_path = local_dir .joinpath ("pyproject.toml" )
806
+ pyproject_path .write_text (
807
+ "[build-system]\n "
808
+ f'requires = ["setuptools", "wheel", "{ depends_package } "]\n '
809
+ 'build-backend = "setuptools.build_meta"\n '
810
+ )
811
+ setup_py_path = local_dir .joinpath ("setup.py" )
812
+ setup_py_path .write_text (
813
+ "from setuptools import setup\n "
814
+ f"setup(name='dummy', setup_requires=['{ depends_package } '])\n "
815
+ )
816
+
817
+ script .pip (
818
+ "install" ,
819
+ "--pre" ,
820
+ "--no-cache-dir" ,
821
+ "--no-index" ,
822
+ "--find-links" ,
823
+ common_wheels ,
824
+ "--find-links" ,
825
+ depends_path .parent ,
826
+ local_dir ,
827
+ )
828
+
829
+
791
830
@pytest .mark .network
792
831
def test_upgrade_argparse_shadowed (script : PipTestEnvironment ) -> None :
793
832
# If argparse is installed - even if shadowed for imported - we support
0 commit comments