Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ jobs:
steps:
- name: Check build matrix status
if: |
needs.build-ubuntu-py314.result != 'success' ||
needs.build-macos-py314.result != 'success' ||
needs.build-ubuntu-py313.result != 'success' ||
needs.build-macos-py313.result != 'success' ||
needs.build-ubuntu-py312.result != 'success' ||
Expand Down
3 changes: 2 additions & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/wheel-axle.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"Source Code": "https://github.com/karellen/wheel-axle/",
"Documentation": "https://github.com/karellen/wheel-axle/"
}
license = "Apache License, Version 2.0"
license = "Apache-2.0"

requires_python = ">=3.9"

Expand Down Expand Up @@ -70,6 +70,7 @@ def set_properties(project):
project.depends_on("wheel", ">=0.37.0")
project.depends_on("wheel-axle-runtime", "<1.0,>0.0.5")
project.build_depends_on("twine")
project.build_depends_on("build")

project.set_property("coverage_break_build", False)
project.set_property("cram_fail_if_no_tests", False)
Expand All @@ -94,14 +95,12 @@ def set_properties(project):
})

project.set_property("distutils_classifiers", [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
Expand Down
37 changes: 37 additions & 0 deletions src/integrationtest/python/build_axle_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,37 @@ def build_axle(self, dir_name, *extra_args):

check_call(["twine", "check", "--strict", f"{self.dist_dir}/*.whl"])

def build_axle_with_build(self, dir_name, **extra_args):
src_dir = jp(self.test_dir, dir_name)
shutil.copytree(src_dir, self.src_dir, symlinks=True, ignore_dangling_symlinks=True)

old_sys_argv = list(sys.argv)
old_sys_path = list(sys.path)
old_cwd = os.getcwd()
paths_to_remove = []
for idx, sys_path_dir in enumerate(sys.path):
if os.path.exists(jp(sys_path_dir, "build.py")):
paths_to_remove.append(sys_path_dir)

for p in paths_to_remove:
sys.path.remove(p)

try:
sys.argv.clear()
sys.argv.extend(["build", "-n", "--wheel",
"-C-v",
"-C-k",
f"-C--bdist-dir={self.build_dir}",
f"-C--dist-dir={self.dist_dir}"] + list(extra_args))
os.chdir(self.src_dir)
runpy.run_module("build", run_name="__main__")
finally:
os.chdir(old_cwd)
sys.argv.clear()
sys.argv.extend(old_sys_argv)
sys.path.clear()
sys.path.extend(old_sys_path)

def install(self, wheel_file, user=False, deps=[]):
check_call([sys.executable, "-m", "pip", "install", "--pre"] +
(["--user", "--force-reinstall"] if user else []) +
Expand All @@ -101,7 +132,13 @@ def uninstall(self, wheel_file):

def test_axle_1(self):
self.build_axle("test_axle_1")
self._test_axle_1()

def test_axle_1_build(self):
self.build_axle_with_build("test_axle_1")
self._test_axle_1()

def _test_axle_1(self):
self.assertTrue(exists(jp(self.dist_dir, "test_axle_1-0.0.1-py3-none-any.whl")))

with open(jp(self.build_dir, "test_axle_1-0.0.1.dist-info", "symlinks.txt")) as f:
Expand Down
5 changes: 2 additions & 3 deletions src/integrationtest/resources/test_axle_1/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def get_files(current_path=None, ignore_root=False):
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Build Tools',
],
keywords='',
Expand All @@ -51,7 +50,7 @@ def get_files(current_path=None, ignore_root=False):
maintainer='Arcadiy Ivanov',
maintainer_email='[email protected]',

license='Apache License, Version 2.0',
license='Apache-2.0',

url='https://karellen.co',
project_urls={
Expand All @@ -69,5 +68,5 @@ def get_files(current_path=None, ignore_root=False):
dependency_links=[],
zip_safe=False,
obsoletes=[],
cmdclass={"bdist_axle": wheel_axle.bdist_axle.BdistAxle}
cmdclass={"bdist_wheel": wheel_axle.bdist_axle.BdistAxle}
)
5 changes: 2 additions & 3 deletions src/integrationtest/resources/test_axle_2_libpython/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def get_files(current_path=None, ignore_root=False):
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Build Tools',
],
keywords='',
Expand All @@ -51,7 +50,7 @@ def get_files(current_path=None, ignore_root=False):
maintainer='Arcadiy Ivanov',
maintainer_email='[email protected]',

license='Apache License, Version 2.0',
license='Apache-2.0',

url='https://karellen.co',
project_urls={
Expand All @@ -69,5 +68,5 @@ def get_files(current_path=None, ignore_root=False):
dependency_links=[],
zip_safe=False,
obsoletes=[],
cmdclass={"bdist_axle": wheel_axle.bdist_axle.BdistAxle}
cmdclass={"bdist_wheel": wheel_axle.bdist_axle.BdistAxle}
)
5 changes: 2 additions & 3 deletions src/integrationtest/resources/test_issue_12/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Build Tools',
],
keywords='',
Expand All @@ -28,7 +27,7 @@
maintainer='Arcadiy Ivanov',
maintainer_email='[email protected]',

license='Apache License, Version 2.0',
license='Apache-2.0',

url='https://karellen.co',
project_urls={
Expand All @@ -47,5 +46,5 @@
dependency_links=[],
zip_safe=False,
obsoletes=[],
cmdclass={"bdist_axle": wheel_axle.bdist_axle.BdistAxle}
cmdclass={"bdist_wheel": wheel_axle.bdist_axle.BdistAxle}
)
6 changes: 6 additions & 0 deletions src/main/python/wheel_axle/bdist_axle/_file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ def copy_link(src, dst, update=0, verbose=1, dry_run=0, reproduce_link=False):
link_dest = os.readlink(src)
link_dest_isdir = os.path.isdir(os.path.join(os.path.dirname(src), link_dest))

if reproduce_link:
if os.path.islink(dst):
if verbose >= 1:
log.info("link %s exists - unlinking", dst)
os.unlink(dst)

if verbose >= 1:
log.info("%s link %s (%s) -> %s",
"reproducing" if reproduce_link else "registering",
Expand Down
Loading