packaging: update publish flow to latest setuptools

This commit is contained in:
Laszlo Nagy
2021-05-17 21:47:08 +10:00
parent d0ad5c7a31
commit d41183ca6c
5 changed files with 21 additions and 11 deletions

View File

@@ -35,7 +35,6 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install flake8 nose lit
python -m pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names

View File

@@ -17,12 +17,12 @@ jobs:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
python3 -m build
python3 -m twine upload dist/*

6
pyproject.toml Normal file
View File

@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"

View File

@@ -1 +0,0 @@
typing; python_version <= '3.5'

View File

@@ -1,9 +1,13 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import setuptools
setup(
with open("README.rst", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name='scan-build',
version='2.0.20',
author='László Nagy',
@@ -12,9 +16,10 @@ setup(
url='https://github.com/rizsotto/scan-build',
license='LICENSE.txt',
description='static code analyzer wrapper for Clang.',
long_description=open('README.rst').read(),
long_description=long_description,
long_description_content_type="text/x-rst",
zip_safe=False,
install_requires=['typing; python_version < "3.5"'],
python_requires=">=3.6",
packages=['libscanbuild', 'libear'],
package_data={'libscanbuild': ['resources/*'],
'libear': ['config.h.in', 'ear.c']},
@@ -42,4 +47,5 @@ setup(
"Programming Language :: Python :: 3.9",
"Topic :: Software Development :: Compilers",
"Topic :: Software Development :: Quality Assurance"
])
]
)