Mercurial > hgrepos > Python > libs > data-schema
view setup.py @ 8:2352d14ae261
Make the packagedata automatic subdir customizable
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 07 Jul 2023 00:32:30 +0200 |
| parents | 72f8dd2ce0ba |
| children |
line wrap: on
line source
# -*- 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)
