Skip to content

Commit 712ccea

Browse files
committed
ci: Build the wheel in build/wheel
1 parent fdbc852 commit 712ccea

File tree

3 files changed

+57
-3
lines changed

3 files changed

+57
-3
lines changed

.github/workflows/wheels.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
curl -LsSf https://astral.sh/uv/install.sh | sh
6262
uv venv -p 3.11.4
6363
source .venv/bin/activate
64-
- run: source .venv/bin/activate && MAKEOPTS="-j$(sysctl -n hw.logicalcpu)" BUILD_TYPE="${{ inputs.release_type }}" make -j$(sysctl -n hw.logicalcpu) uv-install
64+
- run: source .venv/bin/activate && MAKEOPTS="-j$(sysctl -n hw.logicalcpu)" BUILD_TYPE="${{ inputs.release_type }}" make -j$(sysctl -n hw.logicalcpu) uv-build
6565
- name: Install Pytest
6666
run: USE_COVERAGE=1 make pytest-install
6767
- name: Set up the repo for coverage reporting
@@ -80,3 +80,11 @@ jobs:
8080
run: USE_COVERAGE=1 make pytest-app
8181
- name: Report coverage
8282
run: make report-coverage
83+
- name: Copy the ChimeraX directory out of the virtual environment
84+
run: |
85+
mkubdir -p build/wheel/
86+
cp -r .venv/lib/python3.11/site-packages/chimerax build/wheel/
87+
cp pyproject.toml build/wheel
88+
cp utils/build/wheel/make_init.py build/wheel
89+
cp utils/build/wheel/setup.py build/wheel
90+
cd build/wheel && python make_init.py && uv build --wheel

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ ifdef FLATPAK_DIST
5757
endif
5858
@echo 'Finished install at' `date`
5959

60-
uv-install: build-dirs
60+
uv-build: build-dirs
6161
uv pip install -r pyproject.toml --all-extras
6262
UV_BUILD=1 $(MAKE) -C prereqs/pips uv-install
6363
uv pip install PySide6 shiboken6
6464
PYTHON=python $(MAKE) -C src/bundles uv-install
65+
66+
uv-install: build-dirs uv-build
6567
UV_BUILD=1 $(MAKE) -e USE_MAC_FRAMEWORKS='' -C src/apps/ChimeraX
6668
UV_BUILD=1 $(MAKE) -e USE_MAC_FRAMEWORKS='' -C src/apps/ChimeraX uv-install
6769

pyproject.toml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ build-backend = "setuptools.build_meta"
66
name = "ChimeraX"
77
license = "LGPL-2.1" # WHEEL ONLY
88
authors = [{ name = "UCSF RBVI", email = "[email protected]" }]
9-
version = "0.1.6"
109
description = "Analysis and visualization of molecular structures and 3D microscopy"
1110
classifiers = [
1211
'Development Status :: 3 - Alpha',
1312
'Intended Audience :: Science/Research',
1413
'Programming Language :: Python :: 3.11',
1514
]
1615
requires-python = ">=3.11"
16+
dynamic = ["version"]
1717

1818
[project.urls]
1919
Home = "https://www.rbvi.ucsf.edu/chimerax/"
@@ -133,6 +133,50 @@ wheel = [
133133
dev = ["line_profiler==4.2.0"]
134134
test = ["pytest", "pytest-cov", "coverage"]
135135

136+
[tool.setuptools.dynamic]
137+
version = { attr = "chimerax.core.__version__" }
138+
139+
# TODO: Generate this from bundle TOMLs
140+
[tool.setuptools.package-data]
141+
"*" = [
142+
"**/lib/**",
143+
"**/include/**",
144+
"**/*.dylib",
145+
"**/*.so",
146+
"**/*.lib",
147+
"**/*.a",
148+
"**/*.png",
149+
"**/icons/**",
150+
"**/static/**",
151+
"**/html/**",
152+
"**/dcd/**",
153+
"**/bin/**",
154+
"**/data/**",
155+
"**/fragments/**",
156+
"**/nuc-data/**",
157+
"**/cluts/**",
158+
"**/presets/**",
159+
"**/matrices/**",
160+
]
161+
"chimerax.add_charge" = ["amber_name.defattr"]
162+
"chimerax.atom_search" = ["*.pyx"]
163+
"chimerax.atomic" = ["*.pyx"]
164+
"chimerax.basic_actions" = ["*.css", "*.html", "*.js"]
165+
"chimerax.core" = ["colorbrewer.json"]
166+
"chimerax.dunbrack_rotamer_lib" = ["*.zip"]
167+
"chimerax.dynameomics_rotamer_lib" = ["*.zip"]
168+
"chimerax.graphics" = ["*.txt"]
169+
"chimerax.looking_glass" = ["*.txt"]
170+
"chimerax.mmcif" = ["*.cpp", "*.cif"]
171+
"chimerax.registration" = ["registration_form.html"]
172+
"chimerax.rest_server" = ["server.pem"]
173+
"chimerax.richardson_rotamer_lib" = ["*.zip"]
174+
"chimerax.rna_layout" = ["rna_templates_6pj6.cif"]
175+
"chimerax.swapaa" = ["templates.cif"]
176+
"chimerax.toolbar" = ["tool.html"]
177+
"chimerax.ui" = ["about.html", "splash.jpg"]
178+
"chimerax.viewdockx" = ["*.html", "*.css", "*.js"]
179+
136180
[tool.pyright]
137181
include = ["src"]
138182
exclude = ["ChimeraX.app/**"]

0 commit comments

Comments
 (0)