From 2700977a7644c3f95dcbc7218a99d38a6584b358 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Thu, 18 Aug 2022 23:01:59 -0700 Subject: [PATCH] Move to hatch based build --- .gitignore | 3 ++- lethe/LICENSE.md | 1 + lethe/README.md | 1 + lethe/VERSION.py | 4 ---- lethe/__init__.py | 3 +-- pyproject.toml | 48 ++++++++++++++++++++++++++++++++++++++++ setup.py | 56 ----------------------------------------------- 7 files changed, 53 insertions(+), 63 deletions(-) create mode 120000 lethe/LICENSE.md create mode 120000 lethe/README.md delete mode 100644 lethe/VERSION.py create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 7293a7d..4ef7fa9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ __pycache__/ build/ dist/ *.egg-info/ -.mypy_cache +.mypy_cache/ +.pytest_cache/ diff --git a/lethe/LICENSE.md b/lethe/LICENSE.md new file mode 120000 index 0000000..7eabdb1 --- /dev/null +++ b/lethe/LICENSE.md @@ -0,0 +1 @@ +../LICENSE.md \ No newline at end of file diff --git a/lethe/README.md b/lethe/README.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/lethe/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/lethe/VERSION.py b/lethe/VERSION.py deleted file mode 100644 index 0b5e7c8..0000000 --- a/lethe/VERSION.py +++ /dev/null @@ -1,4 +0,0 @@ -""" VERSION defintion. THIS FILE IS MANUALLY PARSED BY setup.py and REQUIRES A SPECIFIC FORMAT """ -__version__ = ''' -0.12 -'''.strip() diff --git a/lethe/__init__.py b/lethe/__init__.py index 1b4dff2..3b861bb 100644 --- a/lethe/__init__.py +++ b/lethe/__init__.py @@ -9,7 +9,6 @@ from .lethe import ( ) from .endpoints import main -from .VERSION import __version__ - __author__ = 'Jan Petykeiwicz' +__version__ = '0.12' diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4264cad --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,48 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "lethe" +description = "Lithography mask library" +readme = "README.md" +license = { file = "LICENSE.md" } +authors = [ + { name="Jan Petykiewicz", email="jan@mpxd.net" }, + ] +homepage = "https://mpxd.net/code/jan/lethe" +repository = "https://mpxd.net/code/jan/lethe" +keywords = [ + "git", + "snapshot", + "commit", + "refs", + "backup", + "undo", + "log", + "lab notebook", + "traceability", + ] +classifiers = [ + "Programming Language :: Python :: 3", + "Development Status :: 4 - Beta", + "Environment :: Other Environment", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Topic :: Software Development :: Version Control :: Git", + "Topic :: Utilities", + ] +requires-python = ">=3.8" +dynamic = ["version"] +dependencies = [ + ] + + +[tool.hatch.version] +path = "lethe/__init__.py" + +[project.scripts] +lethe = "lethe.endpoints:main" +lethe-push = "lethe.endpoints:push" +lethe-fetch = "lethe.endpoints:fetch" diff --git a/setup.py b/setup.py deleted file mode 100644 index 4cb6985..0000000 --- a/setup.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python3 - -from setuptools import setup, find_packages - - -with open('README.md', 'rt') as f: - long_description = f.read() - -with open('lethe/VERSION.py', 'rt') as f: - version = f.readlines()[2].strip() - - -setup(name='lethe', - version=version, - description='Git-based snapshotting', - long_description=long_description, - long_description_content_type='text/markdown', - author='Jan Petykiewicz', - author_email='jan@mpxd.net', - url='https://mpxd.net/code/jan/lethe', - packages=find_packages(), - package_data={ - 'lethe': ['py.typed'], - }, - entry_points={ - 'console_scripts': [ - 'lethe=lethe:endpoints.main', - 'lethe-push=lethe:endpoints.push', - 'lethe-fetch=lethe:endpoints.fetch', - ], - }, - install_requires=[ - 'typing', - ], - keywords=[ - 'git', - 'snapshot', - 'commit', - 'refs', - 'backup', - 'undo', - 'log', - 'lab notebook', - 'traceability', - ], - classifiers=[ - 'Programming Language :: Python :: 3', - 'Development Status :: 4 - Beta', - 'Environment :: Other Environment', - 'Intended Audience :: Developers', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', - 'Topic :: Software Development :: Version Control :: Git', - 'Topic :: Utilities', - ], - )