Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
olapy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
olapy
Commits
18470cf9
Commit
18470cf9
authored
May 30, 2017
by
mouadh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update-deps
parent
1a74ee32
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
14 deletions
+44
-14
setup.py
setup.py
+44
-14
No files found.
setup.py
View file @
18470cf9
...
@@ -11,6 +11,45 @@ from setuptools import find_packages, setup
...
@@ -11,6 +11,45 @@ from setuptools import find_packages, setup
RUNNING_TOX
=
'RUNNING_TOX'
in
os
.
environ
RUNNING_TOX
=
'RUNNING_TOX'
in
os
.
environ
from
setuptools.command.install
import
install
# class PostDevelopCommand(develop):
# """Post-installation for development mode."""
# def run(self):
# # PUT YOUR PRE-INSTALL SCRIPT HERE or CALL A FUNCTION
# print('111111111111111111111111')
# develop.run(self)
#
# basedir = expanduser('~')
# if not os.path.isfile(os.path.join(basedir, 'olapy-data', 'olapy.db')):
# # try:
# from manage import initdb
# initdb()
# # PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION
class
PostInstallCommand
(
install
):
"""Post-installation for installation mode."""
def
run
(
self
):
# PUT YOUR PRE-INSTALL SCRIPT HERE or CALL A FUNCTION
install
.
run
(
self
)
# initiate cubes examples
if
RUNNING_TOX
:
home_directory
=
os
.
environ
.
get
(
'HOME_DIR'
)
else
:
home_directory
=
expanduser
(
"~"
)
if
not
os
.
path
.
isdir
(
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
'cubes'
)):
try
:
os
.
makedirs
(
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
'cubes'
))
zip_ref
=
zipfile
.
ZipFile
(
'cubes_templates/cubes_temp.zip'
,
'r'
)
zip_ref
.
extractall
(
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
'cubes'
))
zip_ref
.
close
()
except
:
raise
Exception
(
'unable to create cubes directory !'
)
session
=
PipSession
()
session
=
PipSession
()
_install_requires
=
parse_requirements
(
'requirements.txt'
,
session
=
session
)
_install_requires
=
parse_requirements
(
'requirements.txt'
,
session
=
session
)
install_requires
=
[
str
(
ir
.
req
)
for
ir
in
_install_requires
]
install_requires
=
[
str
(
ir
.
req
)
for
ir
in
_install_requires
]
...
@@ -27,6 +66,10 @@ setup(
...
@@ -27,6 +66,10 @@ setup(
long_description
=
open
(
'README.rst'
).
read
(),
long_description
=
open
(
'README.rst'
).
read
(),
install_requires
=
install_requires
,
install_requires
=
install_requires
,
include_package_data
=
False
,
include_package_data
=
False
,
cmdclass
=
{
# 'develop': PostDevelopCommand,
'install'
:
PostInstallCommand
,
},
classifiers
=
[
classifiers
=
[
"Programming Language :: Python"
,
"Programming Language :: Python"
,
'Development Status :: 3 - Alpha'
,
'Development Status :: 3 - Alpha'
,
...
@@ -39,17 +82,4 @@ setup(
...
@@ -39,17 +82,4 @@ setup(
# # generate and set secret key
# # generate and set secret key
# os.environ["SECRET_KEY"]
# os.environ["SECRET_KEY"]
# initiate cubes examples
if
RUNNING_TOX
:
home_directory
=
os
.
environ
.
get
(
'HOME_DIR'
)
else
:
home_directory
=
expanduser
(
"~"
)
if
not
os
.
path
.
isdir
(
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
'cubes'
)):
try
:
os
.
makedirs
(
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
'cubes'
))
zip_ref
=
zipfile
.
ZipFile
(
'cubes_templates/cubes_temp.zip'
,
'r'
)
zip_ref
.
extractall
(
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
'cubes'
))
zip_ref
.
close
()
except
:
raise
Exception
(
'unable to create cubes directory !'
)
Write
Preview
Markdown
is supported
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