Skip to content

Commit 6fd86a5

Browse files
committed
Add project metadata and configuration
1 parent 207f321 commit 6fd86a5

File tree

6 files changed

+88
-0
lines changed

6 files changed

+88
-0
lines changed

LICENSE.txt

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Copyright (c) 2004 Infrae. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
1. Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in
12+
the documentation and/or other materials provided with the
13+
distribution.
14+
15+
3. Neither the name of Infrae nor the names of its contributors may
16+
be used to endorse or promote products derived from this software
17+
without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INFRAE OR
23+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# lxml_html_clean
2+
3+
## Motivation
4+
5+
This project was initially a part of [lxml](https://github.com/lxml/lxml). Because HTML cleaner is designed as blocklist-based, many reports about possible security vulnerabilities were filed for lxml and that make the project problematic for security-sensitive environments. Therefore we decided to extract the problematic part to a separate project.
6+
7+
## Installation
8+
9+
You can install this project directly via `pip install lxml_html_clean` or soon as an extra of lxml
10+
itself via `pip install lxml[html_clean]`. Both ways installs this project together with lxml itself.
11+
12+
## Usage
13+
14+
[USAGE.rst](USAGE.rst) contains a part of the lxml documentation related to HTML cleaning.
15+
16+
## License
17+
18+
BSD-3-Clause

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"

setup.cfg

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[metadata]
2+
name = lxml_html_clean
3+
version = 0.1.0
4+
description = HTML cleaner from lxml project
5+
long_description = file:README.md
6+
long_description_content_type = text/markdown
7+
url = https://github.com/fedora-python/lxml_html_clean/
8+
author = Lumír Balhar
9+
author_email = [email protected]
10+
license = BSD-3-Clause
11+
license_files = LICENSE.txt
12+
classifiers =
13+
Programming Language :: Python :: 3
14+
Programming Language :: Python :: 3.6
15+
Programming Language :: Python :: 3.7
16+
Programming Language :: Python :: 3.8
17+
Programming Language :: Python :: 3.9
18+
Programming Language :: Python :: 3.10
19+
Programming Language :: Python :: 3.11
20+
Programming Language :: Python :: 3.12
21+
22+
[options]
23+
packages =
24+
lxml_html_clean
25+
install_requires =
26+
lxml

setup.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from setuptools import setup
2+
3+
setup()

tox.ini

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[tox]
2+
envlist = py36,py37,py38,py39,py310,py311,py312
3+
skipsdist = True
4+
5+
[testenv]
6+
commands =
7+
python -m unittest tests.test_clean
8+
python -m doctest tests/test_clean_embed.txt tests/test_clean.txt
9+
deps = lxml

0 commit comments

Comments
 (0)