[cs615asa] [git commit] CS615 EBS-BACKUP; backup a directory into Elastic Block Storage (EBS) branch main updated. c949801a4611ed877b37544e905acc607c8b0214

Git Owner jschauma at stevens.edu
Mon Apr 26 13:00:07 EDT 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CS615 EBS-BACKUP; backup a directory into Elastic Block Storage (EBS)".

The branch, main has been updated
       via  c949801a4611ed877b37544e905acc607c8b0214 (commit)
       via  8a9904bf319bd4d97c0abd76afb0fb97add17d70 (commit)
       via  c8c952f056056d3b6623b4bf1b39b6d48cf82514 (commit)
       via  8af9e75f4d8c77c8f3b4791342645fd8390720b3 (commit)
       via  5f25a502ef906a74c504825e7189346fc2b9d5af (commit)
      from  fb651e5008bac6432a9e0cd01c55b46974e3c9bc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c949801a4611ed877b37544e905acc607c8b0214
Author: Hayden Daly <hdaly1 at stevens.edu>
Date:   Wed Apr 21 19:58:41 2021 -0400

    Finish pip dependencies

diff --git a/README b/README
index 5e81813..a427320 100644
--- a/README
+++ b/README
@@ -21,4 +21,6 @@ To install the `ebs-backup(1)` tool, you must have pip. To install, run:
 
 ```sh
 pip install -e .
-```
\ No newline at end of file
+```
+
+Then the command `ebs-backup(1)` is usable directly in the command line.
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 68f6b4a..f172395 100644
--- a/setup.py
+++ b/setup.py
@@ -8,19 +8,17 @@ with open("ebs-backup.txt", "r", encoding="utf-8") as fh:
 with open("src/requirements.txt", "r", encoding="utf-8") as fh:
     requirements = fh.read()
     all_requirements = [req.split("==")[0] for req in requirements.split("\n")]
-    
-print(find_namespace_packages())
 
 setup (
     name = 'ebs-backup',
     description = 'Tool to backup ebs volumes',
     long_description = long_description,
     version = '0.0.1',
-    packages=find_namespace_packages(),
     include_package_data = True,
     install_requires = all_requirements, # list of all packages
-    python_requires=">=3.7", # any python greater than 2.7
-    author="2021S CS615",
+    python_requires = ">=3.7", # any python greater than 3.7
+    package_dir={'': 'src'},
+    author = "2021S CS615",
     entry_points = {
         'console_scripts': [
             'ebs-backup=src.main:main'

commit 8a9904bf319bd4d97c0abd76afb0fb97add17d70
Author: Hayden Daly <hdaly1 at stevens.edu>
Date:   Wed Apr 21 16:16:16 2021 -0400

    pip dependency created

diff --git a/README b/README
index 78df48a..5e81813 100644
--- a/README
+++ b/README
@@ -1,3 +1,5 @@
+# ebs-backup(1)
+
 This repository will be used for the shared class
 project for CS615 System Administration.
 
@@ -11,6 +13,12 @@ for full details.
 Commit notifications to this directory are sent
 automatically to cs615asa at lists.stevens.edu.
 
-<project and directory layout description here>
+## Project Structure
+
+## Installation
+
+To install the `ebs-backup(1)` tool, you must have pip. To install, run:
 
-somebody please add something interesting here!
+```sh
+pip install -e .
+```
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 09a0b82..68f6b4a 100644
--- a/setup.py
+++ b/setup.py
@@ -1,21 +1,31 @@
-from setuptools import setup, find_packages
-from os import path
+#!/usr/bin/env python
 
-# https://packaging.python.org/tutorials/packaging-projects/
+from setuptools import setup, find_namespace_packages
 
 with open("ebs-backup.txt", "r", encoding="utf-8") as fh:
     long_description = fh.read()
 
+with open("src/requirements.txt", "r", encoding="utf-8") as fh:
+    requirements = fh.read()
+    all_requirements = [req.split("==")[0] for req in requirements.split("\n")]
+    
+print(find_namespace_packages())
+
 setup (
     name = 'ebs-backup',
     description = 'Tool to backup ebs volumes',
     long_description = long_description,
     version = '0.0.1',
-    packages = find_packages(where="src"), # list of all packages
+    packages=find_namespace_packages(),
+    include_package_data = True,
+    install_requires = all_requirements, # list of all packages
     python_requires=">=3.7", # any python greater than 2.7
     author="2021S CS615",
-    scripts=['src/main.py'],
-    package_dir={"" : "pkg"},
+    entry_points = {
+        'console_scripts': [
+            'ebs-backup=src.main:main'
+        ]
+    },
     license="MIT",
     author_email="hdaly1 at stevens.edu",
     classifiers=[
diff --git a/src/main.py b/src/main.py
index 07eca56..9426ddc 100644
--- a/src/main.py
+++ b/src/main.py
@@ -217,7 +217,9 @@ def backup(args):
         if ec2 is not None:
             ec2.cleanup()
 
-
-if __name__ == '__main__':
+def main():
     args = parse_args(sys.argv[1:])
     backup(args)
+
+if __name__ == '__main__':
+    main()
\ No newline at end of file
diff --git a/src/requirements.txt b/src/requirements.txt
index 9284c9c..67e1149 100644
--- a/src/requirements.txt
+++ b/src/requirements.txt
@@ -7,4 +7,4 @@ python-dateutil==2.8.1
 python-dotenv==0.15.0
 s3transfer==0.3.4
 six==1.15.0
-urllib3==1.26.3
+urllib3==1.26.3
\ No newline at end of file

commit c8c952f056056d3b6623b4bf1b39b6d48cf82514
Merge: 8af9e75 fb651e5
Author: Hayden Daly <hdaly1 at stevens.edu>
Date:   Wed Apr 21 15:36:31 2021 -0400

    Merge branch 'main' of cs615asa:~git/ebs-backup into main


commit 8af9e75f4d8c77c8f3b4791342645fd8390720b3
Merge: 5f25a50 d680152
Author: Hayden Daly <hdaly1 at stevens.edu>
Date:   Wed Apr 21 15:18:49 2021 -0400

    Merge branch 'main' of cs615asa:~git/ebs-backup into main


commit 5f25a502ef906a74c504825e7189346fc2b9d5af
Author: Hayden Daly <hdaly1 at stevens.edu>
Date:   Wed Apr 21 15:13:10 2021 -0400

    Packaging start

diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..09a0b82
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,25 @@
+from setuptools import setup, find_packages
+from os import path
+
+# https://packaging.python.org/tutorials/packaging-projects/
+
+with open("ebs-backup.txt", "r", encoding="utf-8") as fh:
+    long_description = fh.read()
+
+setup (
+    name = 'ebs-backup',
+    description = 'Tool to backup ebs volumes',
+    long_description = long_description,
+    version = '0.0.1',
+    packages = find_packages(where="src"), # list of all packages
+    python_requires=">=3.7", # any python greater than 2.7
+    author="2021S CS615",
+    scripts=['src/main.py'],
+    package_dir={"" : "pkg"},
+    license="MIT",
+    author_email="hdaly1 at stevens.edu",
+    classifiers=[
+        "License :: OSI Approved :: MIT License",
+        "Programming Language :: Python :: 3.7",
+    ]
+)
\ No newline at end of file
diff --git a/src/main.py b/src/main.py
index 445b8d1..27e7ff3 100644
--- a/src/main.py
+++ b/src/main.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 import os
 import subprocess
 import sys

-----------------------------------------------------------------------

Summary of changes:
 README               | 14 ++++++++++++--
 setup.py             | 33 +++++++++++++++++++++++++++++++++
 src/main.py          |  6 ++++--
 src/requirements.txt |  2 +-
 4 files changed, 50 insertions(+), 5 deletions(-)
 create mode 100644 setup.py


hooks/post-receive
-- 
CS615 EBS-BACKUP; backup a directory into Elastic Block Storage (EBS)


More information about the cs615asa mailing list