[ARVADOS] updated: f32690a4a18f85909c0a04de83ecf7819f127df8

git at public.curoverse.com git at public.curoverse.com
Mon Feb 9 12:31:35 EST 2015


Summary of changes:
 sdk/python/gittaggers.py                   | 32 ++++++------------------------
 sdk/python/setup.py                        | 13 ++++--------
 services/fuse/setup.py                     | 13 ++++--------
 services/{fuse => nodemanager}/MANIFEST.in |  0
 services/nodemanager/setup.py              | 13 ++++--------
 5 files changed, 18 insertions(+), 53 deletions(-)
 copy services/{fuse => nodemanager}/MANIFEST.in (100%)

       via  f32690a4a18f85909c0a04de83ecf7819f127df8 (commit)
       via  df507d6cdebca220ac19dbbc5c16d18498cb852c (commit)
      from  f8067dd18b72705f3317e85745e87cffc9e25313 (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.


commit f32690a4a18f85909c0a04de83ecf7819f127df8
Author: Brett Smith <brett at curoverse.com>
Date:   Mon Feb 9 12:31:29 2015 -0500

    5175: Include README for Node Manager packages.

diff --git a/services/nodemanager/MANIFEST.in b/services/nodemanager/MANIFEST.in
new file mode 100644
index 0000000..9561fb1
--- /dev/null
+++ b/services/nodemanager/MANIFEST.in
@@ -0,0 +1 @@
+include README.rst

commit df507d6cdebca220ac19dbbc5c16d18498cb852c
Author: Brett Smith <brett at curoverse.com>
Date:   Mon Feb 9 12:31:11 2015 -0500

    5175: Do not add +sha1 tag to Python packages ever.
    
    PEP 440 is clear that the local version tag is for distributors who
    are patching an upstream release.  That's not us; we are the upstream
    release.  "Local version identifiers SHOULD NOT be used for upstream
    projects," so just don't do it.
    
    This also lets us sidestep the issue of trying to parse sys.argv
    behind setuptools' back.
    
    Developers who want to keep their development builds distinct should
    tag packages themselves with -b .devN.

diff --git a/sdk/python/gittaggers.py b/sdk/python/gittaggers.py
index ea78981..9223443 100644
--- a/sdk/python/gittaggers.py
+++ b/sdk/python/gittaggers.py
@@ -2,39 +2,19 @@ from setuptools.command.egg_info import egg_info
 import subprocess
 import time
 
-class GitTagger(egg_info):
-    """Tag the build with git commit info.
-
-    Exact choice and format is determined by subclass's tags_to_add
-    method.
+class EggInfoFromGit(egg_info):
+    """Tag the build with git commit timestamp.
 
     If a build tag has already been set (e.g., "egg_info -b", building
     from source package), leave it alone.
     """
-    def git_commit_info(self):
+    def git_timestamp_tag(self):
         gitinfo = subprocess.check_output(
             ['git', 'log', '--first-parent', '--max-count=1',
-             '--format=format:%ct %h', '.']).split()
-        assert len(gitinfo) == 2
-        return {
-            'commit_utc': time.strftime(
-                '%Y%m%d%H%M%S', time.gmtime(int(gitinfo[0]))),
-            'commit_sha1': gitinfo[1],
-        }
+             '--format=format:%ct', '.']).strip()
+        return time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo)))
 
     def tags(self):
         if self.tag_build is None:
-            self.tag_build = self.tags_to_add()
+            self.tag_build = self.git_timestamp_tag()
         return egg_info.tags(self)
-
-
-class TagBuildWithCommitDateAndSha1(GitTagger):
-    """Tag the build with the sha1 and date of the last git commit."""
-    def tags_to_add(self):
-        return '.{commit_utc}+{commit_sha1}'.format(**self.git_commit_info())
-
-
-class TagBuildWithCommitDate(GitTagger):
-    """Tag the build with the date of the last git commit."""
-    def tags_to_add(self):
-        return '.{commit_utc}'.format(**self.git_commit_info())
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index ed27fac..4856800 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -9,16 +9,11 @@ from setuptools.command.egg_info import egg_info
 SETUP_DIR = os.path.dirname(__file__) or '.'
 README = os.path.join(SETUP_DIR, 'README.rst')
 
-if '--sha1-tag' in sys.argv:
+try:
     import gittaggers
-    tagger = gittaggers.TagBuildWithCommitDateAndSha1
-    sys.argv.remove('--sha1-tag')
-else:
-    try:
-        import gittaggers
-        tagger = gittaggers.TagBuildWithCommitDate
-    except ImportError:
-        tagger = egg_info
+    tagger = gittaggers.EggInfoFromGit
+except ImportError:
+    tagger = egg_info
 
 setup(name='arvados-python-client',
       version='0.1',
diff --git a/services/fuse/setup.py b/services/fuse/setup.py
index 97f4c1d..49bfc0e 100644
--- a/services/fuse/setup.py
+++ b/services/fuse/setup.py
@@ -9,16 +9,11 @@ from setuptools.command.egg_info import egg_info
 SETUP_DIR = os.path.dirname(__file__) or '.'
 README = os.path.join(SETUP_DIR, 'README.rst')
 
-if '--sha1-tag' in sys.argv:
+try:
     import gittaggers
-    tagger = gittaggers.TagBuildWithCommitDateAndSha1
-    sys.argv.remove('--sha1-tag')
-else:
-    try:
-        import gittaggers
-        tagger = gittaggers.TagBuildWithCommitDate
-    except ImportError:
-        tagger = egg_info
+    tagger = gittaggers.EggInfoFromGit
+except ImportError:
+    tagger = egg_info
 
 setup(name='arvados_fuse',
       version='0.1',
diff --git a/services/nodemanager/setup.py b/services/nodemanager/setup.py
index c28505b..71b3084 100644
--- a/services/nodemanager/setup.py
+++ b/services/nodemanager/setup.py
@@ -9,16 +9,11 @@ from setuptools.command.egg_info import egg_info
 SETUP_DIR = os.path.dirname(__file__) or "."
 README = os.path.join(SETUP_DIR, 'README.rst')
 
-if '--sha1-tag' in sys.argv:
+try:
     import gittaggers
-    tagger = gittaggers.TagBuildWithCommitDateAndSha1
-    sys.argv.remove('--sha1-tag')
-else:
-    try:
-        import gittaggers
-        tagger = gittaggers.TagBuildWithCommitDate
-    except ImportError:
-        tagger = egg_info
+    tagger = gittaggers.EggInfoFromGit
+except ImportError:
+    tagger = egg_info
 
 setup(name='arvados-node-manager',
       version='0.1',

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list