diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 1f02a71..d6cdc35 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -38,7 +38,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9'] + python-version: ['3.7', '3.8', '3.9', '3.10'] steps: - name: Checkout repository diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9787c3b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/requirements.txt b/requirements.txt index 7615063..a1058d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,3 @@ lxml>=4.1.1 requests>=2.5.0 six rfctools_common>=0.6.0 -pycodestyle -pyflakes>=0.8.1 diff --git a/setup.cfg b/setup.cfg index bfe0868..df0f845 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,42 @@ [metadata] version = 0.6.2 +name = svgcheck +description = Verify that an svg file is compliant with the RFC standards. +long_description = file: README.md, LICENSE +long_description_content_type = text/markdown +keywords = svg, validation, rfc +author = IETF Tools Team +license = BSD-3-Clause +url = https://github.com/ietf-tools/svgcheck +classifiers = + Development Status :: 3 - Alpha + Intended Audience :: Other Audience + Topic :: Text Processing + Topic :: Text Processing :: Markup :: XML + License :: OSI Approved :: BSD License + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 +[options] +packages = find: +python_requires = >=3.7, <3.11 +install_requires = file: requirements.txt +include_package_data = True +tests_require = + pycodestyle + pyflakes>=0.8.1 +zip_safe = False + +[options.entry_points] +console_scripts = + svgcheck = svgcheck.run:main + +[options.package_data] +* = + pycode.cfg + Results/* + Tests/*.* + Tests/cache_saved/*.* diff --git a/setup.py b/setup.py deleted file mode 100644 index a7b11bd..0000000 --- a/setup.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -------------------------------------------------- -# Copyright The IETF Trust 2018-2022, All Rights Reserved -# -------------------------------------------------- - -from __future__ import unicode_literals, print_function, division - -import os - -from codecs import open -from setuptools import setup, find_packages - -here = os.path.abspath(os.path.dirname(__file__)) - -# Get the requirements from the local requirements.txt file -with open(os.path.join(here, 'requirements.txt'), encoding='utf-8') as file: - requirements = file.read().splitlines() - -# Get the long description from the README file -with open(os.path.join(here, 'README.md'), encoding='utf-8') as file: - long_description = file.read() - -setup( - name='svgcheck', - - description="Verify that an svg file is compliant with the RFC standards.", - long_description=long_description, - long_description_content_type="text/markdown", - - # The projects main homepage. - url='https://github.com/ietf-tools/svgcheck/', - - # Author details - author='Jim Schaad', - author_email='ietf@augustcellars.com', - - # Choose your license - license='BSD-3-Clause', - - # Classifiers - classifiers = [ - 'Development Status :: 3 - Alpha', - 'Intended Audience :: Other Audience', - 'Topic :: Text Processing', - 'Topic :: Text Processing :: Markup :: XML', - 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - ], - - # What does your project relate to? - keywords='svg validation RFC', - - # - packages=find_packages(exclude=['contrib', 'docs', 'Tests']), - - # List run-time dependencies here. - install_requires=requirements, - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4', - - # List additional gorups of dependencies here. - # extras_require=( - # 'dev':['twine',], - # ] - - # package_data={ - # 'svgcheck': ['run.py'] - # }, - - entry_points={ - 'console_scripts': [ - 'svgcheck=svgcheck.run:main' - ] - }, - zip_safe=False -) diff --git a/svgcheck/Results/version.err b/svgcheck/Results/version.err deleted file mode 100644 index e69de29..0000000 diff --git a/svgcheck/Results/version.out b/svgcheck/Results/version.out deleted file mode 100644 index 65f963c..0000000 --- a/svgcheck/Results/version.out +++ /dev/null @@ -1,2 +0,0 @@ -svgcheck = 0.6.0 -rfctools_common = 0.6.2 diff --git a/svgcheck/test.py b/svgcheck/test.py index 1f0c1f9..02da982 100644 --- a/svgcheck/test.py +++ b/svgcheck/test.py @@ -56,11 +56,6 @@ def test_pyflakes_confrmance(self): class TestCommandLineOptions(unittest.TestCase): """ Run a set of command line checks to make sure they work """ - def test_get_version(self): - check_process(self, [sys.executable, test_program, "--version"], - "Results/version.out", "Results/version.err", - None, None) - def test_clear_cache(self): if not os.path.exists('Temp'): os.mkdir('Temp') diff --git a/tox.ini b/tox.ini index 76d0df7..6e5c206 100644 --- a/tox.ini +++ b/tox.ini @@ -4,15 +4,14 @@ # and then run "tox" from this directory. [tox] -envlist = py{27,36,37,38,39}-{linux,macos,windows} +envlist = py{37,38,39,310}-{linux,macos,windows} [gh-actions] python = - 2.7: py27 - 3.6: py36 3.7: py37 3.8: py38 3.9: py39 + 3.10: py310 [gh-actions:env] PLATFORM = @@ -22,19 +21,11 @@ PLATFORM = [testenv] changedir = svgcheck -commands = +commands = python --version -# flake8 - coverage run test.py - -deps = -# flake8 - coverage - -[flake8] - -max-line-length = 280 -ignore = - W191,E101,E127,E202,W293,W391,W291,E201,E203,E124,E128,E222,E226,E221, - E228,E241,E261,E265,E266,E302,E303,E306,W605,E711,E713,E731 + coverage run test.py +deps = + pycodestyle + pyflakes>=0.8.1 + coverage