69 lines
2.4 KiB
Diff
69 lines
2.4 KiB
Diff
diff -upNr c/pyproject.toml a/pyproject.toml
|
|
--- c/pyproject.toml 2022-11-30 15:32:54.073303454 +0800
|
|
+++ a/pyproject.toml 2022-11-30 15:46:28.976245471 +0800
|
|
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
|
|
name = "soupsieve"
|
|
description = "A modern CSS selector implementation for Beautiful Soup."
|
|
readme = "README.md"
|
|
-license = "MIT"
|
|
+license = {text = "MIT"}
|
|
requires-python = ">=3.6"
|
|
authors = [
|
|
{ name = "Isaac Muse", email = "Isaac.Muse@gmail.com" },
|
|
diff -upNr c/setup.py a/setup.py
|
|
--- c/setup.py 1970-01-01 08:00:00.000000000 +0800
|
|
+++ a/setup.py 2022-11-30 15:55:30.712206925 +0800
|
|
@@ -0,0 +1,52 @@
|
|
+#!/usr/bin/env python
|
|
+
|
|
+
|
|
+from setuptools import setup
|
|
+import os
|
|
+
|
|
+
|
|
+def get_version():
|
|
+ """Get version and version_info without importing the entire module."""
|
|
+
|
|
+ import importlib.util
|
|
+
|
|
+ path = os.path.join(os.path.dirname(__file__), 'soupsieve', '__meta__.py')
|
|
+ spec = importlib.util.spec_from_file_location("__meta__", path)
|
|
+ module = importlib.util.module_from_spec(spec)
|
|
+ spec.loader.exec_module(module)
|
|
+ vi = module.__version_info__
|
|
+ return vi._get_canonical(), vi._get_dev_status()
|
|
+
|
|
+def get_requirements(req):
|
|
+ """Load list of dependencies."""
|
|
+
|
|
+ install_requires = []
|
|
+ with open(req) as f:
|
|
+ for line in f:
|
|
+ if not line.startswith("#"):
|
|
+ install_requires.append(line.strip())
|
|
+ return install_requires
|
|
+VER, DEVSTATUS = get_version()
|
|
+
|
|
+if __name__ == "__main__":
|
|
+ setup(
|
|
+ name = "soupsieve",
|
|
+ version = VER,
|
|
+ install_requires=get_requirements("requirements/project.txt"),
|
|
+ classifiers=[
|
|
+ 'Development Status :: %s' % DEVSTATUS,
|
|
+ 'Environment :: Console',
|
|
+ 'Intended Audience :: Developers',
|
|
+ 'License :: OSI Approved :: MIT License',
|
|
+ 'Operating System :: OS Independent',
|
|
+ 'Programming Language :: Python :: 3',
|
|
+ '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',
|
|
+ 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
|
|
+ 'Topic :: Software Development :: Libraries :: Python Modules',
|
|
+ 'Typing :: Typed'
|
|
+ ]
|
|
+ )
|