Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Knio committed Nov 5, 2023
1 parent b96ae19 commit cafd16a
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 17 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,42 @@ jobs:
- {python: "3.9", os: "ubuntu-22.04"}
- {python: "3.10", os: "ubuntu-22.04"}
- {python: "3.11", os: "ubuntu-22.04"}
- {python: "3.12", os: "ubuntu-22.04"}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
- name: "Set up Python ${{ matrix.python }}"
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install mock
python -m pip install flake8
python -m pip install importlib_metadata
- name: Lint with flake8
python -m pip install importlib_metadata
- name: "Lint with flake8"
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=80 --statistics
- name: Build and test
- name: "Build and test (Old)"
if: matrix.python != "3.12"
run: |
python setup.py sdist --formats=zip
python setup/setup.py sdist --formats=zip
pip install dist/dominate*.zip
pytest
- name: "Build and test (Python 3.12+)"
if: matrix.python == "3.12"
run: |
# lolz theres still no correct way to make a python package
false
- name: Coveralls
env:
env:
COVERAGE_RCFILE: ".github/workflows/.coveragerc"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pip install "coverage"
python -m pip install "coveralls"
python -m pip install coverage
python -m pip install coveralls
coverage run --source=dominate -m pytest
python -m coveralls --service=github || true
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ test:
python2 -m pytest .
python3 -m pytest .

publish: test
rm dist/ -r
python3 setup.py sdist
python3 setup.py bdist_wheel
publish: clean test
python3 setup/setup.py sdist
python3 setup/setup.py bdist_wheel
python3 -m twine upload dist/*

clean:
-rm dist/ -r
-rm *.egg-info/ -r
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"

[project]
name = "dominate"
description = "Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API."
readme = {file = "README.md", content-type = "text/markdown"}
authors = [
{name = "Tom Flanagan", email = "[email protected]"},
{name = "Jake Wharton"},
]
description = "Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API."
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
requires-python = ">=3.4"
keywords = ["framework", "templating", "template", "html", "xhtml", "python", "html5"]
license = {text = "LGPL-3.0-or-newer"}
classifiers = [
Expand All @@ -28,6 +28,8 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand All @@ -36,7 +38,8 @@ classifiers = [
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/Knio/dominate/"
Homepage = "https://github.com/Knio/dominate"
Source = "https://github.com/Knio/dominate"

[tool.setuptools.dynamic]
version = {attr = "dominate._version.__version__"}
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[metadata]
license_file = LICENSE.txt

[bdist_wheel]
universal=1

63 changes: 63 additions & 0 deletions setup/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
__license__ = '''
This file is part of Dominate.
Dominate is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
Dominate is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with dominate. If not, see
<http://www.gnu.org/licenses/>.
'''
# pylint: disable=bad-whitespace

from setuptools import setup

import imp
_version = imp.load_source("dominate._version", "dominate/_version.py")

long_description = open('README.md').read()

setup(
name = 'dominate',
version = _version.__version__,
author = 'Tom Flanagan and Jake Wharton',
author_email = '[email protected]',
license = 'LGPLv3',
url = 'https://github.com/Knio/dominate/',
description = 'Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API.',
long_description = long_description,
long_description_content_type='text/markdown',
keywords = 'framework templating template html xhtml python html5',

python_requires='>=2.7, <3',
classifiers = [
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Text Processing :: Markup :: HTML',
],

packages = ['dominate'],
include_package_data = True,
)

0 comments on commit cafd16a

Please sign in to comment.