16263: Add local_user_list flag to bypass LoginCluster behavior
[arvados.git] / sdk / pam / setup.py
1 #!/usr/bin/env python
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: Apache-2.0
5
6 from __future__ import absolute_import
7 import glob
8 import os
9 import sys
10 import re
11 import subprocess
12
13 from setuptools import setup, find_packages
14
15 SETUP_DIR = os.path.dirname(__file__) or '.'
16 README = os.path.join(SETUP_DIR, 'README.rst')
17
18 import arvados_version
19 version = arvados_version.get_version(SETUP_DIR, "arvados_pam")
20 if os.environ.get('ARVADOS_BUILDING_VERSION', False):
21     pysdk_dep = "=={}".format(version)
22 else:
23     # On dev releases, arvados-python-client may have a different timestamp
24     pysdk_dep = "<={}".format(version)
25
26 short_tests_only = False
27 if '--short-tests-only' in sys.argv:
28     short_tests_only = True
29     sys.argv.remove('--short-tests-only')
30
31 setup(name='arvados-pam',
32       version=version,
33       description='Arvados PAM module',
34       long_description=open(README).read(),
35       author='Arvados',
36       author_email='info@arvados.org',
37       url='https://arvados.org',
38       download_url='https://github.com/arvados/arvados.git',
39       license='Apache 2.0',
40       packages=[
41           'arvados_pam',
42       ],
43       scripts=[
44       ],
45       data_files=[
46           ('lib/security', ['lib/libpam_arvados.py']),
47           ('share/pam-configs', ['pam-configs/arvados']),
48           ('share/doc/arvados-pam', ['LICENSE-2.0.txt', 'README.rst']),
49           ('share/doc/arvados-pam/examples', glob.glob('examples/*')),
50       ],
51       install_requires=[
52           'arvados-python-client{}'.format(pysdk_dep),
53       ],
54       test_suite='tests',
55       tests_require=['pbr<1.7.0', 'mock>=1.0', 'python-pam'],
56       zip_safe=False,
57 )