finished docker manylinux compliation for pypi
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def wheel_build():
|
||||
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
|
||||
|
||||
return wheel_build
|
||||
|
||||
|
||||
def test_compliant_manylinux_tags(wheel_build):
|
||||
assert wheel_build.is_compliant_manylinux_wheel(
|
||||
Path("orisys-0.4.2-cp310-cp310-manylinux_2_17_x86_64.whl")
|
||||
)
|
||||
assert wheel_build.is_compliant_manylinux_wheel(
|
||||
Path("orisys-0.4.2-cp310-cp310-manylinux2014_x86_64.whl")
|
||||
)
|
||||
assert wheel_build.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(
|
||||
Path("orisys-0.4.2-cp310-cp310-manylinux_x86_64.whl")
|
||||
)
|
||||
assert not wheel_build.is_compliant_manylinux_wheel(
|
||||
Path("orisys-0.4.2-cp310-cp310-linux_x86_64.whl")
|
||||
)
|
||||
assert not wheel_build.is_compliant_manylinux_wheel(
|
||||
Path("orisys-0.4.2-cp310-cp310-win_amd64.whl")
|
||||
)
|
||||
|
||||
|
||||
def test_pyproject_no_private_classifier():
|
||||
import sys
|
||||
|
||||
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
|
||||
|
||||
classifiers = project_metadata(REPO_ROOT).get("classifiers", [])
|
||||
assert "Private :: Do Not Upload" not in classifiers
|
||||
assert "License :: Other/Proprietary License" in classifiers
|
||||
Reference in New Issue
Block a user