Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alexis Carlotti
HARMONI-HC
Commits
96d9b55e
Commit
96d9b55e
authored
Oct 25, 2019
by
Alexis Carlotti
Browse files
first commit
parent
d6c98d8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.py
0 → 100644
View file @
96d9b55e
#!/usr/bin/env python
import
os
import
sys
#from distutils.core import setup # dependency does not works
from
setuptools
import
setup
name
=
"harmoni-hc"
version
=
'0.1.dev1'
# https://www.python.org/dev/peps/pep-0440/
author
=
'Alexis Carlotti'
author_email
=
'alexis.carlotti@univ-grenoble-alpes.fr'
install_requires
=
[
'numpy'
,
'scipy'
,
'astropy'
,
'imageio'
,
'math'
]
# in setuptools the egg fragment must have the version in it
# unlike with the pip install git+https://gricad-gitlab.univ-grenoble-alpes.fr/guieus/instru#egg=instru
dependency_links
=
[]
# any file inside the data relative directory name/data_dir will be include as data file
data_directories
=
[]
script_directories
=
[]
license
=
'Creative Commons Attribution-Noncommercial-Share Alike license'
long_description_content_type
=
"text/markdown"
# Python 3.6 or later needed
if
sys
.
version_info
<
(
3
,
6
,
0
,
'final'
,
0
):
raise
SystemExit
(
'Python 3.6 or later is required!'
)
## ######################################################
##
## Try to make this part bellow stand alone so I can copy/past
## to other projects
##
## ######################################################
rootdir
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
# Build a list of all project modules
packages
=
[]
for
dirname
,
dirnames
,
filenames
in
os
.
walk
(
name
):
if
'__init__.py'
in
filenames
:
packages
.
append
(
dirname
.
replace
(
'/'
,
'.'
))
#package_dir = {name: name}
# Data files used e.g. in tests
#package_data = {name: [os.path.join(name, 'tests', 'prt.txt')]}
# The current version number - MSI accepts only version X.X.X
#exec(open(os.path.join(name, 'version.py')).read())
# Scripts
scripts
=
[]
for
script_dir
in
script_directories
:
for
dirname
,
dirnames
,
filenames
in
os
.
walk
(
script_dir
):
for
filename
in
filenames
:
if
not
filename
.
endswith
(
'.bat'
):
scripts
.
append
(
os
.
path
.
join
(
dirname
,
filename
))
# Provide bat executables in the tarball (always for Win)
# if 'sdist' in sys.argv or os.name in ['ce', 'nt']:
# for s in scripts[:]:
# scripts.append(s + '.bat')
# Data_files (e.g. doc) needs (directory, files-in-this-directory) tuples
data_files
=
[]
for
data_dir
,
file_ext
in
data_directories
:
for
dirname
,
dirnames
,
filenames
in
os
.
walk
(
os
.
path
.
join
(
data_dir
)):
fileslist
=
[]
for
filename
in
filenames
:
_
,
ext
=
os
.
path
.
splitext
(
filename
)
if
(
not
file_ext
)
or
(
ext
==
file_ext
):
fullname
=
os
.
path
.
join
(
dirname
,
filename
)
fileslist
.
append
(
fullname
)
#print(('share/' + dirname, fileslist))
data_files
.
append
((
os
.
path
.
join
(
'share'
,
dirname
),
fileslist
))
#####
for
path
in
[
"README.md"
,
"readme.md"
,
"readme.txt"
]:
try
:
readme
=
open
(
'README.md'
).
read
()
except
Exception
as
er
:
print
(
"No readme file : "
,
er
)
else
:
break
else
:
readme
=
""
setup
(
name
=
name
,
version
=
version
,
author
=
author
,
author_email
=
author_email
,
packages
=
packages
,
scripts
=
scripts
,
data_files
=
data_files
,
license
=
license
,
long_description
=
readme
,
long_description_content_type
=
long_description_content_type
,
install_requires
=
install_requires
,
dependency_links
=
dependency_links
,
)
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment