/dist/
/*.egg-info
/tmp
-setup.py
+++ /dev/null
-#!/bin/sh
-#
-# Apparently the only reliable way to distribute Python packages with pypi and
-# install them via pip is as source packages (sdist).
-#
-# That means that setup.py is run on the system the package is being installed on,
-# outside of the Arvados git tree.
-#
-# In turn, this means that we can not build the minor_version on the fly when
-# setup.py is being executed. Instead, we use this script to generate a 'static'
-# version of setup.py which will can be distributed via pypi.
-
-minor_version=`git log --format=format:%ct.%h -n1 .`
-
-sed "s|%%MINOR_VERSION%%|$minor_version|" < setup.py.src > setup.py
-sed "s|%%MINOR_VERSION%%|$minor_version|" < setup_fuse.py.src > setup_fuse.py
try:
with open(PID_PATH, 'r') as f:
server_pid = int(f.read())
- good_pid = (server_pid > 0) and (os.kill(server_pid, 0) == None)
- except:
+ good_pid = (os.kill(server_pid, 0) == None)
+ except Exception:
good_pid = False
if not good_pid:
--- /dev/null
+from setuptools import setup
+import setup_header
+
+setup(name='arvados-python-client',
+ version='0.1.' + setup_header.minor_version,
+ description='Arvados client library',
+ author='Arvados',
+ author_email='info@arvados.org',
+ url="https://arvados.org",
+ download_url="https://github.com/curoverse/arvados.git",
+ license='Apache 2.0',
+ packages=['arvados'],
+ scripts=[
+ 'bin/arv-get',
+ 'bin/arv-put',
+ 'bin/arv-ls',
+ 'bin/arv-normalize',
+ ],
+ install_requires=[
+ 'python-gflags',
+ 'google-api-python-client',
+ 'httplib2',
+ 'urllib3',
+ 'ws4py'
+ ],
+ zip_safe=False)
-from setuptools import setup
-import shutil
-
-minor_version = '%%MINOR_VERSION%%'
-
-# setup.py and setup_fuse.py both share the build/ directory (argh!) so
-# make sure to delete it to avoid scooping up the wrong files.
-shutil.rmtree('build')
-
setup(name='arvados-python-client',
version='0.1.' + minor_version,
description='Arvados client library',
from setuptools import setup
-import distutils
-import shutil
-
-minor_version = '%%MINOR_VERSION%%'
-
-# setup.py and setup_fuse.py both share the build/ directory (argh!) so
-# make sure to delete it to avoid scooping up the wrong files.
-shutil.rmtree('build')
+import setup_header
setup(name='arvados-fuse-driver',
- version='0.1.' + minor_version,
+ version='0.1.' + setup_header.minor_version,
description='Arvados FUSE driver',
author='Arvados',
author_email='info@arvados.org',
--- /dev/null
+import shutil
+import os
+import sys
+
+with os.popen("git log --format=format:%ct.%h -n1 .") as m:
+ minor_version=m.read()
+
+# setup.py and setup_fuse.py both share the build/ directory (argh!) so
+# make sure to delete it to avoid scooping up the wrong files.
+build_dir = os.path.join(os.path.dirname(sys.argv[0]), 'build')
+shutil.rmtree(build_dir, ignore_errors=True)