strix

A simple web UI for motion
git clone https://www.brianlane.com/git/strix
Log | Files | Refs | LICENSE

commit a004c7d292f0ca931c7d6914a4f0ff5c2bf55d12
parent 7fcc3181451eab6babb3db11c4d22e8766034f1d
Author: Brian C. Lane <bcl@brianlane.com>
Date:   Sun, 20 Mar 2022 09:17:45 -0700

Start using modern build system configuration

Things have changed since I originally wrote this. It's time to move the
configuration into setup.cfg and the new pyproject.toml files. Simplify
the requirements so that they are only listed in setup.cfg, not in 3
different files.

NOTE: While tox.ini can support embedding the ini in pyproject.toml it
is only as a raw string so there is no point in switching that at this
time.

Diffstat:
Apyproject.toml | 3+++
Drequirements.txt | 7-------
Msetup.cfg | 36++++++++++++++++++++++++++++++++++++
Msetup.py | 42+++---------------------------------------
Dtesting-requirements.txt | 6------
Mtox.ini | 10----------
6 files changed, 42 insertions(+), 62 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/requirements.txt b/requirements.txt @@ -1,7 +0,0 @@ -bottle -gevent -mypy -Pillow -pytest -rfc3339 -structlog diff --git a/setup.cfg b/setup.cfg @@ -1,3 +1,39 @@ +[metadata] +name = strix +version = 0.0.1 +description = A Motion Camera API Server and UI +license = GPLv2 +author = Brian Lane +author_email= bcl@brianlane.com +keywords = motion security camera strix +url = https://www.brianlane.com/software/strix.html + +[options] +package_dir = + =src +packages = find: +install_requires = + bottle + gevent + mypy + Pillow + rfc3339 + structlog + +[options.packages.find] +where = src + +[options.package_data] +strix = ui/* + +[options.extras_require] +testing = + coverage + mypy + nose + pylint + pytest + [build_sphinx] source-dir = docs/ build-dir = docs/_build diff --git a/setup.py b/setup.py @@ -1,40 +1,4 @@ -from setuptools import setup, find_packages -from setuptools.command.test import test as TestCommand -import sys +# See setup.cfg +from setuptools import setup -class Tox(TestCommand): - user_options = [('tox-args=', 'a', "Arguments to pass to tox")] - def initialize_options(self): - TestCommand.initialize_options(self) - self.tox_args = "" - def finalize_options(self): - TestCommand.finalize_options(self) - self.test_args = [] - self.test_suite = True - def run_tests(self): - #import here, cause outside the eggs aren't loaded - import tox - import shlex - - # It doesn't use the ini by default for some reason - self.tox_args += " -c tox.ini" - errno = tox.cmdline(args=shlex.split(self.tox_args)) - sys.exit(errno) - -setup( - name="strix", - version="0.0.1", - packages=find_packages(), - package_dir = {"strix": "src/strix"}, - package_data = {"strix": ["ui/*"]}, - setup_requires=['nose>=1.0', 'setuptools-lint'], - tests_require=['tox', 'coverage', 'nose', 'pylint'], - cmdclass={'test': Tox}, - - author="Brian Lane", - author_email="bcl@brianlane.com", - description="A Motion Camera API Server and UI", - license="GPLv2", - keywords="motion security camera strix", - url="https://www.brianlane.com/software/strix.html" -) +setup() diff --git a/testing-requirements.txt b/testing-requirements.txt @@ -1,6 +0,0 @@ -coverage -nose -pylint -pytest -mypy -tox diff --git a/tox.ini b/tox.ini @@ -2,16 +2,6 @@ envlist = py38 [testenv] -deps= - bottle - coverage - mypy - nose - pylint - pytest - Pillow - rfc3339 - structlog commands= mypy --strict --ignore-missing-imports src/strix/ src/bin/strix pylint --rcfile=pylint.rc -E src/strix/ src/bin/strix