diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 583abaa8..804ec31a 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -119,7 +119,7 @@ def main() -> None: test_requires = get_option_from_environment('CIBW_TEST_REQUIRES', platform=platform, default='').split() test_extras = get_option_from_environment('CIBW_TEST_EXTRAS', platform=platform, default='') package_dir = args.package_dir - if not package_dir.startswith("."): + if not (os.path.isabs(package_dir) or package_dir.startswith(".")): package_dir = os.path.join(".", package_dir) before_build = get_option_from_environment('CIBW_BEFORE_BUILD', platform=platform) build_verbosity_str = get_option_from_environment('CIBW_BUILD_VERBOSITY', platform=platform, default='') diff --git a/unit_test/main_tests/conftest.py b/unit_test/main_tests/conftest.py index cd896915..ddef7e3d 100644 --- a/unit_test/main_tests/conftest.py +++ b/unit_test/main_tests/conftest.py @@ -18,7 +18,7 @@ class ArgsInterceptor: self.kwargs = kwargs -MOCK_PACKAGE_DIR = 'some_package_dir' +MOCK_PACKAGE_DIR = './some_package_dir' @pytest.fixture(autouse=True)