Skip to content

Commit

Permalink
chore: migrate from setup.py to pyproject.toml (#17)
Browse files Browse the repository at this point in the history
* chore: migrate from setup.py to pyproject.toml

* chore: set major version of semantic release

* ci: update python versions

* ci: update node version
  • Loading branch information
abichinger authored Oct 31, 2023
1 parent 2967ec0 commit b6cae38
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 52 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ ubuntu-latest ]
services:
casbin:
Expand Down Expand Up @@ -84,21 +84,18 @@ jobs:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'

- name: Setup
run: npm install -g semantic-release @semantic-release/github @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/git @semantic-release/release-notes-generator semantic-release-pypi

run: npm install
- name: Set up python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install setuptools
run: python -m pip install --upgrade setuptools wheel twine

python-version: 3.11

- name: Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,6 @@ dmypy.json

# Pyre type checker
.pyre/

# node
node_modules
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
"assets": ["CHANGELOG.md", "setup.py", "setup.cfg"]
"assets": ["CHANGELOG.md", "pyproject.toml"]
}
]
]
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"semantic-release": "^22.0.5",
"semantic-release-pypi": "^3.0.0"
}
}
31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,33 @@
[project]
name = "casbin_etcd_watcher"
version = "1.0.2"
authors = [
{name = "nekotoxin", email = "nekotoxin@gmail.com"},
]
description = "Casbin role watcher to be used for monitoring updates to policies for PyCasbin"
readme = "README.md"
dynamic = ["dependencies"]
license = {text = "Apache 2.0"}
classifiers = [
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"License :: OSI Approved :: Apache Software License",
]

[project.urls]
"Home-page" = "https://github.com/pycasbin/etcd-watcher"

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
exclude = ["tests"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.black]
line-length = 120
3 changes: 0 additions & 3 deletions setup.cfg

This file was deleted.

37 changes: 0 additions & 37 deletions setup.py

This file was deleted.

0 comments on commit b6cae38

Please sign in to comment.