Browse Source

Package for pypi

Nathaniel van Diepen 4 years ago
parent
commit
cd7cc92fe5
5 changed files with 64 additions and 0 deletions
  1. 3 0
      MANIFEST.in
  2. 0 0
      backup/__init__.py
  3. 19 0
      backup/command_line.py
  4. 4 0
      requirements.txt
  5. 38 0
      setup.py

+ 3 - 0
MANIFEST.in

@@ -0,0 +1,3 @@
+include README.md
+include requirements.txt
+include LICENSE

+ 0 - 0
backup.py → backup/__init__.py


+ 19 - 0
backup/command_line.py

@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+import backup
+import sys
+
+
+def main():
+    if __name__ == '__main__':
+        try:
+            backup.main(sys.argv[1:])
+
+        except backup.BackupException as ex:
+            print(ex)
+            sys.exit(1)
+
+        except Exception:
+            from traceback import format_exc
+            msg = "Error encountered:\n" + format_exc().strip()
+            print(msg)
+            sys.exit(1)

+ 4 - 0
requirements.txt

@@ -0,0 +1,4 @@
+blessings==1.7
+intercessions==1.1.6
+PyYAML==3.13
+psutil==5.7.0

+ 38 - 0
setup.py

@@ -0,0 +1,38 @@
+import setuptools
+
+with open("README.md", 'r') as f:
+    long_description = f.read()
+
+with open("requirements.txt", 'r') as f:
+    install_requires = list(f.read().splitlines())
+
+setuptools.setup(
+    name="python-backup",
+    version_format='{tag}.{commitcount}',
+    author="Nathaniel van Diepen",
+    author_email="[email protected]",
+    description="Configuration file based file backup",
+    long_description=long_description,
+    long_description_content_type="text/markdown",
+    url="https://eeems.codes/Eeems/python-backup",
+    include_package_data=True,
+    classifiers=[
+        "Programming Language :: Python :: 3",
+        "Programming Language :: Python :: 3 :: Only",
+        "License :: OSI Approved :: MIT License",
+        "Operating System :: OS Independent",
+        "Development Status :: 4 - Beta",
+        "Environment :: Console",
+        "Intended Audience :: Information Technology",
+        "Intended Audience :: End Users/Desktop",
+        "Natural Language :: English",
+        "Topic :: System :: Archiving :: Backup"
+    ],
+    entry_points={
+        'console_scripts': ['backup=backup.command_line:main'],
+    },
+    python_requires='>=3.6.9',
+    packages=setuptools.find_packages(),
+    setup_requires=['setuptools-git-version'],
+    install_requires=install_requires
+)