Improve python packaging for release 1.9.1
This commit is contained in:
parent
0d1579a157
commit
2a59ac4d63
|
@ -1,9 +1,9 @@
|
||||||
recursive-include tests *.db *.py
|
recursive-include tests *.db *.py
|
||||||
recursive-include templates *.html *.txt yadis.xrdf
|
|
||||||
recursive-include media *.css *.js *.ico *.gif *.png *.jpg README
|
recursive-include media *.css *.js *.ico *.gif *.png *.jpg README
|
||||||
recursive-include authentic2 README fixtures/*.json templates/*/*.html js/*.js templates/*/*/*.html locale/*/*/*.po
|
recursive-include authentic2 README fixtures/*.json templates/*.html templates/*/*.html js/*.js templates/*/*/*.html locale/*/*/*.po xrds.xml *.txt yadis.xrdf
|
||||||
include authentic2/sslauth/authentic_ssl.vhost
|
include authentic2/sslauth/authentic_ssl.vhost
|
||||||
include COPYING
|
include COPYING
|
||||||
include README.rst
|
include README.rst
|
||||||
include authentic2/vendor/oath/TODO
|
include authentic2/vendor/oath/TODO
|
||||||
include authentic2/vendor/totp_js/README.rst
|
include authentic2/vendor/totp_js/README.rst
|
||||||
|
include diagnose.py
|
||||||
|
|
|
@ -2,5 +2,7 @@
|
||||||
|
|
||||||
VERSION=`cat authentic2/__init__.py | grep VERSION | sed 's/VERSION = "\(.*\)"/\1/'`
|
VERSION=`cat authentic2/__init__.py | grep VERSION | sed 's/VERSION = "\(.*\)"/\1/'`
|
||||||
|
|
||||||
python setup.py sdist
|
|
||||||
|
rm -f dist/authentic2-$VERSION.tar.gz && \
|
||||||
|
python setup.py sdist && \
|
||||||
diff <(git ls-files|sort) <(tar tf dist/authentic2-$VERSION.tar.gz|sort|grep -v '/$'|sed "s#.*-$VERSION/##")
|
diff <(git ls-files|sort) <(tar tf dist/authentic2-$VERSION.tar.gz|sort|grep -v '/$'|sed "s#.*-$VERSION/##")
|
||||||
|
|
23
setup.py
23
setup.py
|
@ -7,11 +7,14 @@ import distutils.core
|
||||||
import authentic2
|
import authentic2
|
||||||
import os
|
import os
|
||||||
|
|
||||||
def ls_R(directory):
|
def ls_R(directory, target):
|
||||||
'''Recursively list files in @directory'''
|
'''Recursively list files in @directory'''
|
||||||
for root, dirs, files in os.walk(directory):
|
path = os.path.join(os.path.dirname(__file__), directory)
|
||||||
for file in files:
|
to_remove = os.path.dirname(path)
|
||||||
yield os.path.join(root, file)
|
for root, dirs, files in os.walk(path):
|
||||||
|
root = root.replace(to_remove + '/', '')
|
||||||
|
file_list = [ os.path.join(root, file) for file in files]
|
||||||
|
yield (os.path.join(target, root), file_list)
|
||||||
|
|
||||||
# Build the authentic package.
|
# Build the authentic package.
|
||||||
distutils.core.setup(name="authentic2",
|
distutils.core.setup(name="authentic2",
|
||||||
|
@ -23,7 +26,6 @@ distutils.core.setup(name="authentic2",
|
||||||
author_email="authentic-devel@lists.labs.libre-entreprise.org",
|
author_email="authentic-devel@lists.labs.libre-entreprise.org",
|
||||||
maintainer="Benjamin Dauvergne",
|
maintainer="Benjamin Dauvergne",
|
||||||
maintainer_email="bdauvergne@entrouvert.com",
|
maintainer_email="bdauvergne@entrouvert.com",
|
||||||
py_modules=['manage'],
|
|
||||||
packages=[ 'authentic2',
|
packages=[ 'authentic2',
|
||||||
'authentic2/admin_log_view',
|
'authentic2/admin_log_view',
|
||||||
'authentic2/auth2_auth',
|
'authentic2/auth2_auth',
|
||||||
|
@ -42,10 +44,17 @@ distutils.core.setup(name="authentic2",
|
||||||
'authentic2/sslauth',
|
'authentic2/sslauth',
|
||||||
'authentic2/vendor',
|
'authentic2/vendor',
|
||||||
'authentic2/vendor/oath',
|
'authentic2/vendor/oath',
|
||||||
'authentic2/vendor/totp_js',],
|
'authentic2/vendor/totp_js',
|
||||||
|
'authentic2/sslauth/migrations',
|
||||||
|
'authentic2/saml/migrations',
|
||||||
|
'authentic2/auth2_auth/auth2_oath/migrations',
|
||||||
|
'authentic2/auth2_auth/migrations',
|
||||||
|
'authentic2/authsaml2/migrations',
|
||||||
|
'authentic2/idp/idp_openid/migrations',
|
||||||
|
],
|
||||||
package_data={ '': ['fixtures/*.json',
|
package_data={ '': ['fixtures/*.json',
|
||||||
'templates/*.html','templates/*/*.html','js/*.js'] },
|
'templates/*.html','templates/*/*.html','js/*.js'] },
|
||||||
data_files=[('/share/authentic2/media/', list(ls_R('media')))],
|
data_files=list(ls_R('media', 'share/authentic2/')),
|
||||||
requires=[
|
requires=[
|
||||||
'django (>=1.2.0)',
|
'django (>=1.2.0)',
|
||||||
'registration (>=0.7)',
|
'registration (>=0.7)',
|
||||||
|
|
Loading…
Reference in New Issue