Skip to content

Commit

Permalink
Prepare for pypi.org distribution and release 1.0.0
Browse files Browse the repository at this point in the history
Restructured to be capable of distributing towards pypi.org
  • Loading branch information
kwesolowski committed Dec 28, 2021
1 parent f00332b commit b041582
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
Empty file added gitrelevanthistory/__init__.py
Empty file.
14 changes: 6 additions & 8 deletions git-relevant-history → gitrelevanthistory/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
-v --verbose print status messages
"""
import glob
import logging
import os
import pathlib
import shutil
import subprocess
Expand Down Expand Up @@ -95,6 +93,12 @@ def build_git_filter_path_spec(git_repo: pathlib.Path, str_subdir: str) -> typin


def main():
arguments = docopt(__doc__)
if arguments['--verbose']:
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.INFO)

source_repo = pathlib.Path(arguments['--source']).expanduser().absolute()
if not source_repo.is_dir():
logger.critical(f"--source {source_repo} is not a directory")
Expand Down Expand Up @@ -175,10 +179,4 @@ def main():


if __name__ == '__main__':
arguments = docopt(__doc__)
if arguments['--verbose']:
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.INFO)

main()
34 changes: 34 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import pathlib
import setuptools

# The directory containing this file
HERE = pathlib.Path(__file__).parent

# The text of the README file
README = (HERE / "README.md").read_text()

# This call to setup() does all the work
setuptools.setup(
name="git-relevant-history",
version="1.0.0",
description="Extract subproject with just the relevant history",
long_description=README,
long_description_content_type="text/markdown",
url="https://github.com/rainlabs-eu/git-relevant-history",
author="Rainlabs",
author_email="[email protected]",
license="Apache License 2.0",
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
],
packages=setuptools.find_packages(exclude=("tests",)),
include_package_data=True,
install_requires=[],
entry_points={
"console_scripts": [
"git-relevant-history=gitrelevanthistory.main:main",
]
},
)

0 comments on commit b041582

Please sign in to comment.