Skip to content

Commit 8726f8c

Browse files
authored
Fix uv pip install from binary distribution (wheels) usage (#4210)
* fix uv pip install from bdist usage * use uv to build wheels * add single quote for macos * add single quote for macos * try ATAT3 install, it should fail * Revert "try ATAT3 install, it should fail" This reverts commit 3f63f4b. * modest verbose level * use mamba native env name and py ver
1 parent 5abe81c commit 8726f8c

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,36 +61,34 @@ jobs:
6161
- name: Check out repo
6262
uses: actions/checkout@v4
6363

64-
- name: Set up micromamba
65-
uses: mamba-org/setup-micromamba@main
66-
6764
- name: Create mamba environment
68-
run: |
69-
micromamba create -n pmg python=${{ matrix.config.python }} --yes
65+
uses: mamba-org/setup-micromamba@main
66+
with:
67+
environment-name: pmg
68+
create-args: >-
69+
python=${{ matrix.config.python }}
7070
7171
- name: Install ubuntu-only conda dependencies
7272
if: matrix.config.os == 'ubuntu-latest'
7373
run: |
7474
micromamba install -n pmg -c conda-forge bader enumlib \
7575
openff-toolkit packmol pygraphviz tblite --yes
7676
77+
- name: Install uv
78+
uses: astral-sh/setup-uv@v4
79+
7780
- name: Install pymatgen and dependencies via uv
7881
run: |
7982
micromamba activate pmg
80-
81-
pip install uv
82-
8383
# TODO1 (use uv over pip) uv install torch is flaky, track #3826
8484
# TODO2 (pin torch version): DGL library (matgl) doesn't support torch > 2.2.1,
8585
# see: https://discuss.dgl.ai/t/filenotfounderror-cannot-find-dgl-c-graphbolt-library/4302
8686
pip install torch==2.2.1
8787
8888
# Install from wheels to test the content
89-
uv pip install build
90-
python -m build --wheel
91-
92-
uv pip install dist/*.whl
93-
uv pip install pymatgen[${{ matrix.config.extras }}] --resolution=${{ matrix.config.resolution }}
89+
uv build --wheel --no-build-logs
90+
WHEEL_FILE=$(ls dist/pymatgen*.whl)
91+
uv pip install $WHEEL_FILE[${{matrix.config.extras}}] --resolution=${{matrix.config.resolution}}
9492
9593
- name: Install optional Ubuntu dependencies
9694
if: matrix.config.os == 'ubuntu-latest'

0 commit comments

Comments
 (0)