Skip to content

Commit 1c69f62

Browse files
authored
fix: migrate setup.py to pyproject.toml (#27)
* chore: migrate setup.py to pyproject.toml * chore: set major version of semantic release
1 parent f7ccf80 commit 1c69f62

File tree

7 files changed

+61
-43
lines changed

7 files changed

+61
-43
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,13 @@ jobs:
8787
node-version: '18'
8888

8989
- name: Setup
90-
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
91-
90+
run: npm install
91+
9292
- name: Set up python
93-
uses: actions/setup-python@v2
93+
uses: actions/setup-python@v4
9494
with:
95-
python-version: '3.10'
96-
97-
- name: Install setuptools
98-
run: python -m pip install --upgrade setuptools wheel twine
99-
95+
python-version: 3.11
96+
10097
- name: Release
10198
env:
10299
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,6 @@ dmypy.json
132132
*.iml
133133

134134
.DS_Store
135+
136+
# node
137+
node_modules

.releaserc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@semantic-release/git",
1717
{
1818
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
19-
"assets": ["CHANGELOG.md", "setup.py", "setup.cfg"]
19+
"assets": ["CHANGELOG.md", "pyproject.toml"]
2020
}
2121
]
2222
]

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"devDependencies": {
3+
"@semantic-release/changelog": "^6.0.3",
4+
"@semantic-release/git": "^10.0.1",
5+
"semantic-release": "^22.0.5",
6+
"semantic-release-pypi": "^3.0.0"
7+
}
8+
}

pyproject.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,46 @@
1+
[project]
2+
name = "casbin-django-orm-adapter"
3+
version = "1.1.2"
4+
authors = [
5+
{name = "Yang Luo", email = "hsluoyz@qq.com"},
6+
]
7+
description = "Django's ORM adapter for PyCasbin"
8+
readme = "README.md"
9+
keywords = [
10+
"casbin",
11+
"adapter",
12+
"storage-driver",
13+
"django",
14+
"orm",
15+
"django-orm",
16+
"access-control",
17+
"authorization"
18+
]
19+
dynamic = ["dependencies"]
20+
requires-python = ">=3.7"
21+
license = {text = "Apache 2.0"}
22+
classifiers = [
23+
"Programming Language :: Python :: 3.7",
24+
"Programming Language :: Python :: 3.8",
25+
"Programming Language :: Python :: 3.9",
26+
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3.11",
28+
"License :: OSI Approved :: Apache Software License",
29+
"Operating System :: OS Independent",
30+
]
31+
32+
[project.urls]
33+
Home-page = "https://github.com/pycasbin/django-orm-adapter"
34+
35+
[build-system]
36+
requires = ["setuptools"]
37+
build-backend = "setuptools.build_meta"
38+
39+
[tool.setuptools.packages.find]
40+
exclude = ["tests"]
41+
42+
[tool.setuptools.dynamic]
43+
dependencies = {file = ["requirements.txt"]}
44+
145
[tool.black]
246
line-length = 120

setup.cfg

Lines changed: 0 additions & 3 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)