Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge packaging updates #30

Merged
merged 11 commits into from
Nov 29, 2024
Merged
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
24 changes: 15 additions & 9 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches:
- "package-*"
tags:
- "package-*"
- "v*"
release:
types:
- published
Expand Down Expand Up @@ -48,6 +48,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Build wheels
uses: pypa/[email protected]
Expand All @@ -58,11 +59,15 @@ jobs:
CIBW_ARCHS: ${{ matrix.buildplat[2] }}
CIBW_BUILD_VERBOSITY: 1

- name: git status
run: |
git status

- name: upload artifacts
if: |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/package')) ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) ||
(github.event_name == 'release' && github.event.action == 'published')
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
retention-days: 7
Expand All @@ -79,23 +84,24 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Build sdist
run: pipx run build --sdist

- name: upload artifacts
if: |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/package')) ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) ||
(github.event_name == 'release' && github.event.action == 'published')
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
retention-days: 7

upload_testpypi_lipyds:
if: |
github.repository == 'lilyminium/lipyds' &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/package'))
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
name: testpypi_upload_lipyds
environment:
name: deploy
Expand All @@ -105,7 +111,7 @@ jobs:
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
Expand All @@ -129,7 +135,7 @@ jobs:
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
Expand All @@ -140,7 +146,7 @@ jobs:
check_testpypi:
if: |
github.repository == 'lilyminium/lipyds' &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/package'))
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
name: testpypi check
runs-on: ${{ matrix.os }}
timeout-minutes: 60
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ wheels/
*.egg-info/
.installed.cfg
*.egg
*.cpp
*.xtc_offsets.npz
wheelhouse/
*.whl

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
global-include *.pyx
global-include *.pxd
global-include *.c
global-include *.cpp
global-include *.h
global-include *.cpp
recursive-include doc *
Expand Down
8 changes: 1 addition & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,11 @@ testpaths = [

[tool.versioningit.vcs]
method = "git"
match = ["package-*"]
match = ["v*"]
default-tag = "0.0.0"

[tool.versioningit.format]

distance = "{base_version}+{distance}.{vcs}{rev}"
dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"

[tool.versioningit.write]
file = "lipyds/_version.py"

[tool.versioningit.tag2version]
rmprefix = "package-"
8 changes: 0 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,5 @@ USE_TABS = False
# Flake8, PyFlakes, etc
max-line-length = 119

[versioneer]
# Automatic version numbering scheme
VCS = git
style = pep440
versionfile_source = lipyds/_version.py
versionfile_build = lipyds/_version.py
tag_prefix = v

[aliases]
test = pytest
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from distutils.ccompiler import new_compiler
from distutils.sysconfig import customize_compiler

RELEASE = "0.0.2-dev"
RELEASE = "0.0.1"

is_release = 'dev' not in RELEASE

Expand Down
Loading