Skip to content

Commit 303049d

Browse files
committed
fix: move project config to setup.cfg
1 parent 3aef0cc commit 303049d

File tree

3 files changed

+49
-55
lines changed

3 files changed

+49
-55
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,32 @@
11
name: test
22

3-
on: [push, pull_request]
3+
on:
4+
- push
5+
- pull_request
46

57
jobs:
68
build:
7-
name: Test run
89
runs-on: ubuntu-latest
910
strategy:
1011
matrix:
11-
python-version: [3.6, 3.7, 3.8, pypy3, 3.9-dev, 3.10-dev]
12-
12+
tox_env:
13+
- py27
14+
- py36
15+
- py37
16+
- py38
17+
- py39
18+
- pypy3
1319
steps:
14-
- name: Check out code into the Python module directory
15-
uses: actions/checkout@v2
16-
- name: Setup Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v2
18-
if: "!endsWith(matrix.python-version, '-dev')"
19-
with:
20-
python-version: ${{ matrix.python-version }}
21-
- name: Setup test matrix
22-
uses: deadsnakes/action@v2.0.2
23-
if: endsWith(matrix.python-version, '-dev')
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install -r requirements.txt && pip install -r requirements-dev.txt
30-
pip install -e .
31-
- name: Lint with flake8
32-
run: |
33-
# stop the build if there are Python syntax errors or undefined names
34-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37-
- name: Run unit tests
38-
run: |
39-
py.test test/
40-
- name: Install tox
41-
run: pip install tox
42-
- name: Run tox e2e tests
43-
run: tox -e integration
20+
- uses: actions/checkout@v2
21+
- name: Fedora Tox with ${{ matrix.tox_env }}
22+
uses: fedora-python/tox-github-action@v0.4
23+
with:
24+
tox_env: ${{ matrix.tox_env }}
25+
- uses: actions/setup-python@v2
26+
- uses: actions/cache@v2
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-pip
4430

4531
deploy:
4632
name: Build deploy

setup.cfg

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
[metadata]
2-
description-file = README.md
2+
name = upcloud_api
3+
description = UpCloud API Client
4+
long_description = README.md
5+
long_description_content_type = text/markdown
6+
opriginal_author = Elias Nygren
7+
maintainer = UpCloud
8+
maintainer_email = hello@upcloud.com
9+
url = https://github.com/UpCloudLtd/upcloud-python-api
10+
packages=['upcloud_api', 'upcloud_api.cloud_manager']
11+
license = MIT
12+
13+
[options]
14+
python_requires = >=3.6
15+
setup_requires =
16+
setuptools
17+
pytest-runner
18+
install_requires =
19+
requests
20+
six
21+
tests_require =
22+
pytest==4.0.2
23+
packages =
24+
upcloud_api
25+
upcloud_api.cloud_manager
26+
27+
[tox:tox]
28+
envlist = py27, py36, py37, py38, py39, pypy3
329

430
[bdist_wheel]
531
universal = 1

setup.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,5 @@ def get_version(rel_path):
2323
with open('README.md') as f:
2424
long_description = f.read()
2525

26-
version = get_version('upcloud_api/__init__.py')
27-
setup(
28-
name='upcloud-api',
29-
version=version,
30-
description='UpCloud API Client',
31-
long_description=long_description,
32-
long_description_content_type='text/markdown',
33-
author='Elias Nygren',
34-
maintainer='UpCloud',
35-
maintainer_email='hello@upcloud.com',
36-
url='https://github.com/UpCloudLtd/upcloud-python-api',
37-
packages=['upcloud_api', 'upcloud_api.cloud_manager'],
38-
download_url='https://github.com/UpCloudLtd/upcloud-python-api/archive/%s.tar.gz' % version,
39-
license='MIT',
40-
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*',
41-
install_requires=[
42-
'requests>=2.24.0',
43-
'six==1.15.0'
44-
]
45-
)
26+
if __name__ == "__main__":
27+
setup(version=get_version('upcloud_api/__init__.py'))

0 commit comments

Comments
 (0)