Mercurial > hgrepos > Python > libs > data-schema
changeset 7:72f8dd2ce0ba
Packaging support: sdist and wheel
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 07 Jul 2023 00:00:50 +0200 |
| parents | fc18f1cb3309 |
| children | 2352d14ae261 |
| files | MANIFEST.in pyproject.toml setup.py |
| diffstat | 3 files changed, 61 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MANIFEST.in Fri Jul 07 00:00:50 2023 +0200 @@ -0,0 +1,5 @@ +include *.txt .hg* pyproject.toml +graft docs +prune docs/_build +graft tests +global-exclude *.pyc *.pyo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pyproject.toml Fri Jul 07 00:00:50 2023 +0200 @@ -0,0 +1,38 @@ +[build-system] +requires = ["setuptools>=67.0", "wheel>=0.38"] +build-backend = "setuptools.build_meta" + +[project] +name = "data-schema" +description = "A data validation library using schemata inspired from JSON Schema" +license = {text = "BSD 3-Clause \"New\" or \"Revised\" License"} +requires-python = ">=3.4" +authors = [ + {name = "Franz Glasner", email = "fzglas.hg@dom66.de"} +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Topic :: File Formats :: JSON :: JSON Schema", + "Topic :: Software Development :: Libraries :: Python Modules" +] +dependencies = [ + "rfc3986>=1.5.0", + "ConfigMix[yaml]" +] + +dynamic = ["version", "readme"] + +[tool.setuptools] +packages = [ + "data_schema", +] +include-package-data = false +zip-safe = true + +[tool.setuptools.dynamic] +readme = {file = ["README.txt"], content-type="text/x-rst"}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/setup.py Fri Jul 07 00:00:50 2023 +0200 @@ -0,0 +1,18 @@ +# -*- coding: utf-8; indent-tabs-mode: nil; -*- + +import os +import re + +from setuptools import setup + + +pkg_root = os.path.dirname(__file__) + +_version_re = re.compile(br"^\s*__version__\s*=\s*(\"|')(.*)\1\s*(#.*)?$", + re.MULTILINE) + +with open(os.path.join(pkg_root, "data_schema", "__init__.py"), "rb") as vf: + version = _version_re.search(vf.read()).group(2).decode("utf-8") + + +setup(version=version)
