Skip to content

Commit

Permalink
Testings
Browse files Browse the repository at this point in the history
  • Loading branch information
tfmoraes committed May 7, 2024
1 parent 85c558a commit e8bd0b5
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 2 deletions.
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.9.2 FATAL_ERROR)

SET(DCMAKE_CXX_STANDARD 11)
SET(GDCM_BUILD_APPLICATIONS ON)
SET(GDCM_DOCUMENTATION OFF)
SET(GDCM_BUILD_DOCBOOK_MANPAGES OFF)


if (WIN32)
SET(DGDCM_BUILD_SHARED_LIBS OFF)
else()
SET(DGDCM_BUILD_SHARED_LIBS ON)
endif(WIN32)

SET(GDCM_WRAP_PYTHON ON)
SET(GDCM_NO_PYTHON_LIBS_LINKING ON)

SET(EXECUTABLE_OUTPUT_PATH "${SKBUILD_PLATLIB_DIR}/_gdcm")
SET(LIBRARY_OUTPUT_PATH "${SKBUILD_PLATLIB_DIR}/_gdcm")

SET(GDCM_USE_SYSTEM_OPENSSL ON)

ADD_SUBDIRECTORY("gdcm_src")
57 changes: 55 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[build-system]
build-backend = "setuptools.build_meta"
build-backend = "hatchling.build"
requires = [
"setuptools >= 61.0",
"hatchling",
"wheel",
"ninja >= 1.10.2.3",
"cmake >= 3.22.1",
"scikit-build-core~=0.9.0",
]

[project]
Expand Down Expand Up @@ -59,6 +60,58 @@ gdcmxml = "_gdcm.scripts.gdcmxml:main"
Homepage="https://github.com/tfmoraes/python-gdcm/"
issues="https://github.com/tfmoraes/python-gdcm/issues"

[tool.hatch.build.targets.sdist]
include = [
"gdcm.py",
"_gdcm/*",
"gdcm_src/*"
]
exclude = [
"gdcm_src/.*",
"gdcm_src/Testing",
".gitignore"
]

[tool.hatch.build.targets.wheel]
packages = ["_gdcm", "gdcm.py"]
artifacts = [
"gdcm.py",
"*.py",
"*.so.*",
"_gdcm*.so",
# Linux modules.
"*-linux-gnu.so",
# Unix shared libraries.
"lib*.so*",
# macOS modules.
"*-darwin.so",
# macOS shared libraries.
"lib*.dylib*",
# Windows modules.
"*.pyd",
# Windows shared libraries.
"*.dll",
# GDCM applications
"*.exe",
"gdcmanon",
"gdcmconv",
"gdcmdiff",
"gdcmdump",
"gdcmgendir",
"gdcmimg",
"gdcminfo",
"gdcmpap3",
"gdcmraw",
"gdcmscanner",
"gdcmscu",
"gdcmtar",
"gdcmxml",
"XML/*.xml",
]

[tool.hatch.build.targets.wheel.hooks.scikit-build]
experimental = true

[tool.setuptools]
py-modules=[ "gdcm", ]
packages=[ "_gdcm", "_gdcm.scripts" ]
Expand Down

0 comments on commit e8bd0b5

Please sign in to comment.