mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-01 18:30:05 +02:00
Merge branch 'developer' into fix/dbitreorder_should_only_be_defined_for_chip_and_xilinx
This commit is contained in:
commit
292d65491a
2
.github/workflows/conda_python.yaml
vendored
2
.github/workflows/conda_python.yaml
vendored
@ -33,7 +33,7 @@ jobs:
|
||||
run: conda config --set anaconda_upload no
|
||||
|
||||
- name: Build
|
||||
run: conda build conda-recipes/python-client --output-folder build_output
|
||||
run: conda build conda-recipes/python-client --output-folder build_output
|
||||
|
||||
- name: Upload all Conda packages
|
||||
uses: actions/upload-artifact@v4
|
||||
|
@ -1,11 +1,11 @@
|
||||
package:
|
||||
name: sls_detector_software
|
||||
version: 2025.3.19
|
||||
|
||||
|
||||
source:
|
||||
path: ../..
|
||||
|
||||
{% set version = load_file_regex(load_file = 'VERSION', regex_pattern = '(\d+(?:\.\d+)*(?:[\+\w\.]+))').group(1) %}
|
||||
package:
|
||||
name: sls_detector_software
|
||||
version: {{ version }}
|
||||
|
||||
build:
|
||||
number: 0
|
||||
binary_relocation: True
|
||||
@ -49,8 +49,6 @@ outputs:
|
||||
- libgcc-ng
|
||||
|
||||
|
||||
|
||||
|
||||
- name: slsdetgui
|
||||
script: copy_gui.sh
|
||||
requirements:
|
||||
|
@ -1,10 +1,11 @@
|
||||
package:
|
||||
name: slsdet
|
||||
version: 2025.3.19 #TODO! how to not duplicate this?
|
||||
|
||||
source:
|
||||
path: ../..
|
||||
|
||||
{% set version = load_file_regex(load_file = 'VERSION', regex_pattern = '(\d+(?:\.\d+)*(?:[\+\w\.]+))').group(1) %}
|
||||
package:
|
||||
name: slsdet
|
||||
version: {{ version }}
|
||||
|
||||
build:
|
||||
number: 0
|
||||
script:
|
||||
@ -17,7 +18,6 @@ requirements:
|
||||
- {{ stdlib("c") }}
|
||||
- {{ compiler('cxx') }}
|
||||
|
||||
|
||||
host:
|
||||
- cmake
|
||||
- ninja
|
||||
|
@ -1,27 +1,33 @@
|
||||
[tool.scikit-build.metadata.version]
|
||||
provider = "scikit_build_core.metadata.regex"
|
||||
input = "VERSION"
|
||||
regex = '^(?P<version>\d+(?:\.\d+)*(?:[\.\+\w]+)?)$'
|
||||
result = "{version}"
|
||||
|
||||
[build-system]
|
||||
requires = ["scikit-build-core>=0.10", "pybind11", "numpy"]
|
||||
requires = [ "scikit-build-core>=0.10", "pybind11", "numpy",]
|
||||
build-backend = "scikit_build_core.build"
|
||||
|
||||
[project]
|
||||
name = "slsdet"
|
||||
version = "2025.3.19"
|
||||
|
||||
dynamic = ["version"]
|
||||
|
||||
[tool.cibuildwheel]
|
||||
before-all = "uname -a"
|
||||
|
||||
[tool.scikit-build]
|
||||
build.verbose = true
|
||||
cmake.build-type = "Release"
|
||||
install.components = ["python"]
|
||||
[tool.scikit-build.build]
|
||||
verbose = true
|
||||
|
||||
[tool.scikit-build.cmake]
|
||||
build-type = "Release"
|
||||
|
||||
[tool.scikit-build.install]
|
||||
components = [ "python",]
|
||||
|
||||
[tool.scikit-build.cmake.define]
|
||||
#Only build the control software and python ext
|
||||
SLS_USE_RECEIVER = "OFF"
|
||||
SLS_USE_RECEIVER_BINARIES = "OFF"
|
||||
SLS_USE_TEXTCLIENT = "OFF"
|
||||
SLS_BUILD_SHARED_LIBRARIES = "OFF"
|
||||
|
||||
SLS_USE_PYTHON = "ON"
|
||||
SLS_INSTALL_PYTHONEXT = "ON"
|
||||
SLS_INSTALL_PYTHONEXT = "ON"
|
||||
|
@ -5,7 +5,12 @@ Script to update VERSION file with semantic versioning if provided as an argumen
|
||||
"""
|
||||
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
|
||||
from packaging.version import Version, InvalidVersion
|
||||
|
||||
|
||||
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
def get_version():
|
||||
|
||||
@ -14,23 +19,24 @@ def get_version():
|
||||
return "0.0.0"
|
||||
|
||||
version = sys.argv[1]
|
||||
|
||||
# Validate that the version argument matches semantic versioning format (X.Y.Z)
|
||||
if not re.match(r'^\d+\.\d+\.\d+$', version):
|
||||
print("Error: Version argument must be in semantic versioning format (X.Y.Z)")
|
||||
|
||||
try:
|
||||
v = Version(version) # normalizcheck if version follows PEP 440 specification
|
||||
#replace -
|
||||
return version.replace("-", ".")
|
||||
except InvalidVersion as e:
|
||||
print(f"Invalid version {version}. Version format must follow semantic versioning format of python PEP 440 version identification specification.")
|
||||
sys.exit(1)
|
||||
|
||||
return version
|
||||
|
||||
|
||||
def write_version_to_file(version):
|
||||
with open("VERSION", "w") as version_file:
|
||||
version_file_path = os.path.join(SCRIPT_DIR, "VERSION")
|
||||
with open(version_file_path, "w") as version_file:
|
||||
version_file.write(version)
|
||||
print(f"Version {version} written to VERSION file.")
|
||||
|
||||
|
||||
# Main script
|
||||
if __name__ == "__main__":
|
||||
|
||||
version = get_version()
|
||||
write_version_to_file(version)
|
||||
write_version_to_file(version)
|
||||
|
Loading…
x
Reference in New Issue
Block a user