From c74acd6363695d90e0ba8ded3219f6ed233fb116 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Mon, 8 Jun 2020 08:05:25 +0200 Subject: [PATCH] change to abspath --- cibuildwheel/__main__.py | 4 +--- unit_test/main_tests/conftest.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 804ec31a..ce8555cf 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -118,9 +118,7 @@ def main() -> None: test_command = get_option_from_environment('CIBW_TEST_COMMAND', platform=platform) 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 (os.path.isabs(package_dir) or package_dir.startswith(".")): - package_dir = os.path.join(".", package_dir) + package_dir = os.path.abspath(args.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='') build_config, skip_config = os.environ.get('CIBW_BUILD', '*'), os.environ.get('CIBW_SKIP', '') diff --git a/unit_test/main_tests/conftest.py b/unit_test/main_tests/conftest.py index ddef7e3d..4542b9df 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 = os.path.abspath('some_package_dir') @pytest.fixture(autouse=True)