Skip to content

Commit

Permalink
Improve setup and use PEP517 (#84)
Browse files Browse the repository at this point in the history
* Improve setup and use PEP517

* Create quick-pep517-test.yml

* Update quick-pep517-test.yml

* Remove test & fix typo

* Create test-use-pypa-build.yml

* Update test-use-pypa-build.yml

* Move from pep517.build to pypa/build

pypa/pyproject-hooks#91

* Update setup.cfg

* Update setup.cfg

Co-authored-by: Myst <1592048+Mystou@users.noreply.github.com>
  • Loading branch information
LeMyst and LeMyst authored Jan 17, 2021
1 parent 8133332 commit 38e6930
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 52 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,28 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install wheel
- name: Install pypa/build
run: >-
python -m
pip install
wheel
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python
setup.py
sdist
bdist_wheel
python -m
build
--sdist
--wheel
.
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools >= 40.9.0",
"wheel"
]
build-backend = "setuptools.build_meta"
38 changes: 38 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
[metadata]
name = wikibaseintegrator
version = 0.10.0.dev0
author = Myst and WikidataIntegrator authors
license = MIT
license-file = LICENSE.txt
description = Python package for reading from and writing to a Wikibase instance
keywords = wikibase, wikidata, mediawiki, sparql
home-page = https://github.com/LeMyst/WikibaseIntegrator
project_urls =
Bug Tracker = https://github.com/LeMyst/WikibaseIntegrator/issues
long_description = file: README.md
long_description_content_type = text/markdown
platform = any
classifiers =
Programming Language :: Python
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Development Status :: 4 - Beta
Operating System :: POSIX
Operating System :: MacOS :: MacOS X
Operating System :: Microsoft :: Windows
Intended Audience :: Science/Research
Intended Audience :: Information Technology
Intended Audience :: Developers
Topic :: Utilities
Topic :: Software Development :: Libraries :: Python Modules

[options]
packages = wikibaseintegrator
install_requires =
simplejson
requests
pandas
mwoauth
backoff
python_requires = >=3.7, <3.10

[options.extras_require]
dev = pytest
48 changes: 2 additions & 46 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,3 @@
from setuptools import setup
import setuptools

VERSION = "0.10.0.dev0"

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

setup(
name='wikibaseintegrator',
version=VERSION,
author='Myst and WikidataIntegrator authors',
description='Python package for reading from and writing to a Wikibase instance',
long_description=long_description,
long_description_content_type="text/markdown",
license='MIT',
keywords='Wikibase',
url='https://github.com/LeMyst/WikibaseIntegrator',
packages=['wikibaseintegrator'],
python_requires='>=3.7',
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Development Status :: 4 - Beta",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Intended Audience :: Science/Research",
"Intended Audience :: Information Technology",
"Intended Audience :: Developers",
"Topic :: Utilities",
"Topic :: Software Development :: Libraries :: Python Modules"
],
install_requires=[
'simplejson',
'requests',
'pandas',
'mwoauth',
'backoff'
],
extras_require={
'dev': [
'pytest'
]
}
)
setuptools.setup()

0 comments on commit 38e6930

Please sign in to comment.