reorganized build directory
This commit is contained in:
@@ -12,7 +12,7 @@ def packaging_utils():
|
||||
build_dir = REPO_ROOT / "build"
|
||||
if str(build_dir) not in sys.path:
|
||||
sys.path.insert(0, str(build_dir))
|
||||
from pyproject_utils import extras_require, install_requires, project_metadata
|
||||
from common.pyproject_utils import extras_require, install_requires, project_metadata
|
||||
|
||||
return install_requires, extras_require, project_metadata
|
||||
|
||||
@@ -33,7 +33,7 @@ def test_pyproject_dynamic_version(packaging_utils):
|
||||
build_dir = REPO_ROOT / "build"
|
||||
if str(build_dir) not in sys.path:
|
||||
sys.path.insert(0, str(build_dir))
|
||||
from pyproject_utils import get_version
|
||||
from common.pyproject_utils import get_version
|
||||
|
||||
assert get_version(REPO_ROOT) == "0.4.2"
|
||||
|
||||
@@ -44,7 +44,7 @@ def test_pyproject_bundle_manifest(packaging_utils):
|
||||
build_dir = REPO_ROOT / "build"
|
||||
if str(build_dir) not in sys.path:
|
||||
sys.path.insert(0, str(build_dir))
|
||||
from pyproject_utils import bundle_data_files, bundle_items
|
||||
from common.pyproject_utils import bundle_data_files, bundle_items
|
||||
|
||||
items = bundle_items(REPO_ROOT)
|
||||
names = {item["name"] for item in items}
|
||||
@@ -69,7 +69,7 @@ def test_bundle_explicit_files():
|
||||
build_dir = REPO_ROOT / "build"
|
||||
if str(build_dir) not in sys.path:
|
||||
sys.path.insert(0, str(build_dir))
|
||||
from wheel_layout import data_file_entries_for_item, resolve_bundle_source_files
|
||||
from wheel.layout import data_file_entries_for_item, resolve_bundle_source_files
|
||||
|
||||
item = {
|
||||
"name": "configs",
|
||||
|
||||
+12
-12
@@ -6,37 +6,37 @@ REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def wheel_build():
|
||||
def wheel_package():
|
||||
import sys
|
||||
|
||||
build_dir = REPO_ROOT / "build"
|
||||
if str(build_dir) not in sys.path:
|
||||
sys.path.insert(0, str(build_dir))
|
||||
import wheel_build
|
||||
from wheel import package as wheel_package
|
||||
|
||||
return wheel_build
|
||||
return wheel_package
|
||||
|
||||
|
||||
def test_compliant_manylinux_tags(wheel_build):
|
||||
assert wheel_build.is_compliant_manylinux_wheel(
|
||||
def test_compliant_manylinux_tags(wheel_package):
|
||||
assert wheel_package.is_compliant_manylinux_wheel(
|
||||
Path("orisys-0.4.2-cp310-cp310-manylinux_2_17_x86_64.whl")
|
||||
)
|
||||
assert wheel_build.is_compliant_manylinux_wheel(
|
||||
assert wheel_package.is_compliant_manylinux_wheel(
|
||||
Path("orisys-0.4.2-cp310-cp310-manylinux2014_x86_64.whl")
|
||||
)
|
||||
assert wheel_build.is_compliant_manylinux_wheel(
|
||||
assert wheel_package.is_compliant_manylinux_wheel(
|
||||
Path("orisys-0.4.2-cp310-cp310-manylinux_2_28_x86_64.whl")
|
||||
)
|
||||
|
||||
|
||||
def test_rejects_illegal_manylinux_tags(wheel_build):
|
||||
assert not wheel_build.is_compliant_manylinux_wheel(
|
||||
def test_rejects_illegal_manylinux_tags(wheel_package):
|
||||
assert not wheel_package.is_compliant_manylinux_wheel(
|
||||
Path("orisys-0.4.2-cp310-cp310-manylinux_x86_64.whl")
|
||||
)
|
||||
assert not wheel_build.is_compliant_manylinux_wheel(
|
||||
assert not wheel_package.is_compliant_manylinux_wheel(
|
||||
Path("orisys-0.4.2-cp310-cp310-linux_x86_64.whl")
|
||||
)
|
||||
assert not wheel_build.is_compliant_manylinux_wheel(
|
||||
assert not wheel_package.is_compliant_manylinux_wheel(
|
||||
Path("orisys-0.4.2-cp310-cp310-win_amd64.whl")
|
||||
)
|
||||
|
||||
@@ -47,7 +47,7 @@ def test_pyproject_no_private_classifier():
|
||||
build_dir = REPO_ROOT / "build"
|
||||
if str(build_dir) not in sys.path:
|
||||
sys.path.insert(0, str(build_dir))
|
||||
from pyproject_utils import project_metadata
|
||||
from common.pyproject_utils import project_metadata
|
||||
|
||||
classifiers = project_metadata(REPO_ROOT).get("classifiers", [])
|
||||
assert "Private :: Do Not Upload" not in classifiers
|
||||
|
||||
Reference in New Issue
Block a user