Skip to content

Commit

Permalink
Change setup.py to pyproject.toml (#56)
Browse files Browse the repository at this point in the history
* Change setup.py to pyproject.toml

* Update pypi

* Update to py312
  • Loading branch information
giswqs authored Sep 20, 2024
1 parent cd9c2e0 commit 9d2a86d
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Install GDAL
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: ["macOS-latest"]
python-version: ["3.11"]
python-version: ["3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ jobs:
TWINE_USERNAME: ${{ secrets.PYPI_USERS }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
pip install build
python -m build
twine upload dist/*
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
python-version: "3.11"
python-version: "3.12"
- name: Install GDAL
run: |
conda install -c conda-forge gdal --yes
Expand Down
7 changes: 0 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ repos:
rev: 24.8.0
hooks:
- id: black-jupyter
language_version: python3.11

# - repo: https://github.com/codespell-project/codespell
# rev: v2.2.6
# hooks:
# - id: codespell
# args: [--toml, pyproject-codespell.precommit-toml]

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
Expand Down
66 changes: 66 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "geospatial"
version = "0.10.4"
dynamic = [
"dependencies",
]
description = "A Python package for installing commonly used packages for geospatial analysis and data visualization with only one command."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT license"}
keywords = ["geospatial"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
authors = [{name = "Qiusheng Wu", email = "[email protected]"}]

[tool]
[tool.setuptools.packages.find]
include = ["geospatial*"]
exclude = ["docs*"]


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

[tool.distutils.bdist_wheel]
universal = true

[tool.bumpversion]
current_version = "0.10.4"
commit = true
tag = true

[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "geospatial/__init__.py"
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'

[tool.flake8]
exclude = [
"docs",
]
max-line-length = 88

[tool.setuptools_scm]

[project.urls]
Homepage = "https://github.com/opengeos/geospatial"
20 changes: 0 additions & 20 deletions setup.cfg

This file was deleted.

56 changes: 0 additions & 56 deletions setup.py

This file was deleted.

0 comments on commit 9d2a86d

Please sign in to comment.