Skip to content

Commit

Permalink
Update packaging to use setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
sde1000 committed Oct 22, 2022
1 parent e856005 commit fa35d95
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 41 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-asyncio pyserial-asyncio
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install flake8
pip install -e ".[test]"
- name: Lint with flake8
run: |
flake8 dali --exclude=driver --count --ignore=E741,F403,F405,W503 --show-source --statistics --max-line-length=127
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
#flake8 dali --exclude=driver --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 dali --count --show-source --statistics
- name: Test with pytest
run: |
pytest dali/tests
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ exceptions raised by the native ``int.from_bytes()`` and
- A driver has been added for Lunatone LUBA serial DALI
interfaces. [sl-wallace]

- Support for colour devices (device type 8) has been added.
[sl-wallace / Petr Ilgner]

- Support for occupancy sensors (IEC 62386 part 303). [sl-wallace]

- Support for light sensors (IEC 62386 part 304). [sl-wallace]

0.9 (2022-04-21)
----------------

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools >= 45.0"]
build-backend = "setuptools.build_meta"
46 changes: 46 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[metadata]
name = python-dali
version = 0.9
description = Interface to DALI lighting systems
long_description = file: README.rst
long_description_content_type = text/x-rst
author = Stephen Early
author_email = [email protected]
url = https://github.com/sde1000/python-dali
license = LGPL3+
license_files =
COPYING
COPYING.LESSER
LICENSE
classifiers =
Development Status :: 3 - Alpha
Intended Audience :: Developers
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Programming Language :: Python :: 3

[options]
python_requires = >=3.7
packages =
dali
dali.device
dali.driver
dali.gear
dali.memory
dali.tests

[options.extras_require]
driver-unipi =
pyusb
pymodbus
driver-serial = pyserial-asyncio
test =
pytest
pytest-asyncio
pyserial-asyncio

[flake8]
exclude = */driver/
ignore = E741, F403, F405, W503
# Please write with max-line-length = 80 where possible
max-line-length = 103
37 changes: 1 addition & 36 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,4 @@
#!/usr/bin/env python3
from setuptools import setup
import unittest


def readme():
with open('README.rst') as f:
return f.read()

setup(
name='python-dali',
version='0.9',
description='Interface to DALI lighting systems',
long_description=readme(),
long_description_content_type='text/x-rst',
author='Stephen Early',
author_email='[email protected]',
url='https://github.com/sde1000/python-dali',
packages=[
'dali',
'dali.device',
'dali.driver',
'dali.gear',
'dali.memory',
'dali.tests',
],
extras_require={
"driver-unipi": ["pyusb", "pymodbus"],
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
'Programming Language :: Python :: 3',
],
license='LGPL3+',
keywords='lighting DALI development',
)
setup()

0 comments on commit fa35d95

Please sign in to comment.