mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-26 03:04:30 +01:00
apply pep8 recommandation to setup.py
This commit is contained in:
parent
2e85e10f0a
commit
b831bc82dc
34
setup.py
34
setup.py
@ -56,12 +56,11 @@ try:
|
|||||||
import pytest
|
import pytest
|
||||||
errno = pytest.main(self.test_args)
|
errno = pytest.main(self.test_args)
|
||||||
sys.exit(errno)
|
sys.exit(errno)
|
||||||
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
PyTest = lambda x: x
|
PyTest = lambda x: x
|
||||||
|
|
||||||
|
|
||||||
# just a small function to easily install a complete directory
|
# just a small function to easily install a complete directory
|
||||||
def get_list_files(basedir, targetdir):
|
def get_list_files(basedir, targetdir):
|
||||||
return_list = []
|
return_list = []
|
||||||
@ -74,15 +73,24 @@ def get_list_files(basedir, targetdir):
|
|||||||
return return_list
|
return return_list
|
||||||
|
|
||||||
# add static files and templates in the list of thing to deploy
|
# add static files and templates in the list of thing to deploy
|
||||||
resources_files = get_list_files('resources',
|
resources_files = get_list_files(
|
||||||
os.path.join(datarootdir, 'share', 'ldapcherry'))
|
'resources',
|
||||||
|
os.path.join(datarootdir, 'share', 'ldapcherry')
|
||||||
|
)
|
||||||
|
|
||||||
# add the configuration files if they don't exist
|
# add the configuration files if they don't exist
|
||||||
if not os.path.exists(os.path.join(sysconfdir, 'ldapcherry')):
|
if not os.path.exists(
|
||||||
resources_files.append((
|
os.path.join(sysconfdir, 'ldapcherry')):
|
||||||
|
resources_files.append(
|
||||||
|
(
|
||||||
os.path.join(sysconfdir, 'ldapcherry'),
|
os.path.join(sysconfdir, 'ldapcherry'),
|
||||||
[ 'conf/ldapcherry.ini', 'conf/attributes.yml', 'conf/roles.yml']
|
[
|
||||||
))
|
'conf/ldapcherry.ini',
|
||||||
|
'conf/attributes.yml',
|
||||||
|
'conf/roles.yml'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='ldapcherry',
|
name='ldapcherry',
|
||||||
@ -90,7 +98,11 @@ setup(
|
|||||||
version='0.0.1',
|
version='0.0.1',
|
||||||
author='Pierre-Francois Carpentier',
|
author='Pierre-Francois Carpentier',
|
||||||
author_email='carpentier.pf@gmail.com',
|
author_email='carpentier.pf@gmail.com',
|
||||||
packages = ['ldapcherry', 'ldapcherry.backend', 'ldapcherry.ppolicy'],
|
packages=[
|
||||||
|
'ldapcherry',
|
||||||
|
'ldapcherry.backend',
|
||||||
|
'ldapcherry.ppolicy'
|
||||||
|
],
|
||||||
data_files=resources_files,
|
data_files=resources_files,
|
||||||
scripts=['scripts/ldapcherryd'],
|
scripts=['scripts/ldapcherryd'],
|
||||||
url='https://github.com/kakwa/ldapcherry',
|
url='https://github.com/kakwa/ldapcherry',
|
||||||
@ -98,7 +110,7 @@ setup(
|
|||||||
description=small_description,
|
description=small_description,
|
||||||
long_description=description,
|
long_description=description,
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
tests_require = ['pytest'],
|
tests_require=['pytest', 'pep8'],
|
||||||
cmdclass={'test': PyTest},
|
cmdclass={'test': PyTest},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 3 - Alpha',
|
'Development Status :: 3 - Alpha',
|
||||||
@ -111,5 +123,5 @@ setup(
|
|||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Programming Language :: Python :: 2.7',
|
'Programming Language :: Python :: 2.7',
|
||||||
'Topic :: Internet :: LDAP'
|
'Topic :: Internet :: LDAP'
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user