Skip to content

Commit

Permalink
Convert from flit to setuptools. (GitHub #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
tardis4500 committed Feb 17, 2025
1 parent af0efcb commit 173ef88
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
git config user.email "${{ github.triggering_actor }}@users.noreply.github.com"
git pull
- name: Publish to Test PyPi
uses: pypa/[email protected].3
uses: pypa/[email protected].4
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: ${{ env.ARTIFACTS_DIR }}
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
- name: Run post-publish steps
run: vjer release
- name: Publish to PyPi
uses: pypa/[email protected].3
uses: pypa/[email protected].4
with:
packages-dir: ${{ env.ARTIFACTS_DIR }}
- name: Upload released artifacts
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
.LSOverride

# Icon must end with two \r
Icon
Icon

# Thumbnails
._*
Expand Down Expand Up @@ -274,3 +274,4 @@ $RECYCLE.BIN/
.p4cfg
artifacts/
unit_test_results/
git-stream-*
39 changes: 36 additions & 3 deletions .p4ignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
# Created by https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,git
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,visualstudiocode,python,git
# Created by https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,git,macos
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,visualstudiocode,python,git,macos

### Git ###
# Created by git for backups. To disable backups in Git:
Expand All @@ -17,6 +17,38 @@
*_LOCAL_*.txt
*_REMOTE_*.txt

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -234,11 +266,12 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,git
# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python,git,macos

# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)

.git/
.p4cfg
artifacts/
unit_test_results/
git-stream-*
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## Current Release

### [2.0.1] - Unreleased
### [2.0.1] - 2025-02-16

- Changed
- Moved repo to Arisilon organization. (GitHub #1)
- Moved repo to Arisilon organization. (GitHub #2)
- Convert from flit to setuptools. (GitHub #3)

## Release History

Expand Down
4 changes: 2 additions & 2 deletions git_stream/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
'__license__', '__copyright__')

__title__ = 'git-stream'
__summary__ = 'CI/CD Toolkit'
__summary__ = 'Git Stream Implementation'
__uri__ = 'https://github.com/arisilon/git-stream/'

__version__ = '2.0.0rc0'
__version__ = '2.0.1rc0'
__build_name__ = '{var:build_name}'
__build_date__ = '{var:build_date}'

Expand Down
17 changes: 11 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "git-stream"
description = "Git Stream Implementation"
authors = [{ name = "Jeffery G. Smith", email = "[email protected]" }]
readme = "DOCUMENTATION.md"
license = { file = "LICENSE" }
dynamic = ["version", "description"]
dynamic = ["version"]

requires-python = "~=3.12"
keywords = ["python", "programming", "utilities"]
Expand All @@ -23,9 +24,7 @@ classifiers = [
"Natural Language :: English",
]

dependencies = [
"BatCave"
]
dependencies = ["BatCave"]

[project.optional-dependencies]
dev = ["vjer", "bumpver"]
Expand All @@ -41,6 +40,12 @@ documentation = "https://git-stream.readthedocs.io"
repository = "https://github.com/arisilon/git-stream/"
changelog = "https://github.com/arisilon/git-stream/blob/main/CHANGELOG.md"

[tool.setuptools]
packages = ["git_stream"]

[tool.setuptools.dynamic]
version = { attr = "git_stream.__version__" }

[tool.flake8]
max-line-length = 200
ignore = ["ANN002", "ANN003", "ANN101", "ANN204", "ANN401"]
Expand Down
7 changes: 1 addition & 6 deletions util/Update-Env.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version Latest

python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager setuptools wheel
pip install --upgrade --upgrade-strategy eager flit
pip freeze | ForEach-Object{$_.split('==')[0]} | ForEach-Object{pip install --upgrade $_}
flit install --only-deps --deps all
& $PSScriptRoot\update-env-core.ps1
3 changes: 3 additions & 0 deletions util/update-env-core.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager setuptools wheel
pip install --upgrade --upgrade-strategy eager .[dev]
8 changes: 2 additions & 6 deletions util/update-env.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/usr/bin/env bash
set -eu

python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager setuptools wheel
pip install --upgrade --upgrade-strategy eager flit
pip freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install --upgrade
flit install -s --only-deps --deps all
SCRIPT_DIR=""
bash $(dirname "$(realpath "$0")")/update-env-core.ps1
4 changes: 2 additions & 2 deletions vjer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ test:
- git_stream
build:
steps:
- type: flit
- type: setuptools
release:
steps:
- type: bumpver
- type: flit_build
- type: setuptools_build
release_only: true
- type: github
release_only: true
Expand Down

0 comments on commit 173ef88

Please sign in to comment.