From f7e445a7954a4fd1c0c8da3e5f7e73505f217b53 Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Thu, 13 Jan 2022 18:42:17 +0300 Subject: [PATCH] Moved the metadata into `setup.cfg` Added `pyproject.toml` Version info is now handled by `setuptools_scm` Ignored `build` and `clonetest` dirs. Fixed paths in `.gitignore`, they should ignore only the dirs in the repo root. --- .gitignore | 15 +++++++++------ bin/editorconfig-git-preserve-history | 3 --- editorconfig_git_preserve_history/__init__.py | 1 - .../{main.py => __main__.py} | 0 pyproject.toml | 5 +++++ setup.cfg | 19 +++++++++++++++++++ setup.py | 17 ----------------- 7 files changed, 33 insertions(+), 27 deletions(-) delete mode 100755 bin/editorconfig-git-preserve-history rename editorconfig_git_preserve_history/{main.py => __main__.py} (100%) create mode 100644 pyproject.toml create mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index ae95a76..bbee3a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,12 @@ -.idea/ -*.pyc -dist/ +/clonetest + +/.idea/ +*.py[co] +/dist/ +/build /__pycache__/ /*.egg-info /*.egg -venv/ -.mypy_cache/ -.pytest_cache/ +/venv/ +/.mypy_cache/ +/.pytest_cache/ diff --git a/bin/editorconfig-git-preserve-history b/bin/editorconfig-git-preserve-history deleted file mode 100755 index 4f52a20..0000000 --- a/bin/editorconfig-git-preserve-history +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env python3 -import editorconfig_git_preserve_history -editorconfig_git_preserve_history.find_and_write_commits() \ No newline at end of file diff --git a/editorconfig_git_preserve_history/__init__.py b/editorconfig_git_preserve_history/__init__.py index 247b0e0..e69de29 100644 --- a/editorconfig_git_preserve_history/__init__.py +++ b/editorconfig_git_preserve_history/__init__.py @@ -1 +0,0 @@ -from .main import find_and_write_commits diff --git a/editorconfig_git_preserve_history/main.py b/editorconfig_git_preserve_history/__main__.py similarity index 100% rename from editorconfig_git_preserve_history/main.py rename to editorconfig_git_preserve_history/__main__.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..66ddafd --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[build-system] +requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..9ceb2a3 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,19 @@ +[metadata] +name = EditorConfigGitPreserveHistory +author = David Meybohm +author_email = dmeybohm@gmail.com +license = MIT +description = Commit changes from editorconfig and preserve authorship +url = http://github.com/dmeybohm/editorconfig-git-preserve-history +long_description = file: README.rst +long_description_content_type = text/x-rst + +[options] +packages = editorconfig_git_preserve_history +install_requires = EditorConfig>=0.12.1; dateutil +test_suite = nose.collector +tests_require = nose + +[options.entry_points] +console_scripts = + editorconfig-git-preserve-history = editorconfig_git_preserve_history.__main__:find_and_write_commits diff --git a/setup.py b/setup.py deleted file mode 100644 index 6328e85..0000000 --- a/setup.py +++ /dev/null @@ -1,17 +0,0 @@ -from setuptools import setup - -setup(name='EditorConfigGitPreserveHistory', - version='0.1', - description='Commit changes from editorconfig and preserve authorship', - long_description=open('README.rst').read(), - url='http://github.com/dmeybohm/editorconfig-git-preserve-history', - author='David Meybohm', - author_email='dmeybohm@gmail.com', - license='MIT', - packages=['editorconfig_git_preserve_history'], - install_requires=[ - 'EditorConfig>=0.12.1', - ], - scripts=['bin/editorconfig-git-preserve-history'], - test_suite='nose.collector', - tests_require=['nose'])