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
93df06cd
Commit
93df06cd
authored
Jun 02, 2017
by
mouadh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
not working
parent
578f642d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
olapy/core/mdx/executor/execute.py
olapy/core/mdx/executor/execute.py
+3
-1
olapy/core/mdx/tools/config_file_parser.py
olapy/core/mdx/tools/config_file_parser.py
+7
-1
setup.py
setup.py
+8
-4
No files found.
olapy/core/mdx/executor/execute.py
View file @
93df06cd
...
...
@@ -115,7 +115,9 @@ class MdxEngine:
def
_get_default_cube_directory
(
self
):
# toxworkdir does not expanduser properly under tox
if
RUNNING_TOX
:
if
'OLAPY_PATH'
in
os
.
environ
:
home_directory
=
os
.
environ
.
get
(
'OLAPY_PATH'
)
elif
RUNNING_TOX
:
home_directory
=
os
.
environ
.
get
(
'HOME_DIR'
)
else
:
home_directory
=
expanduser
(
"~"
)
...
...
olapy/core/mdx/tools/config_file_parser.py
View file @
93df06cd
...
...
@@ -198,12 +198,18 @@ class ConfigParser:
:param cube_path: path to cube (csv folders)
:param file_name: config file name (DEFAULT = cubes-config.xml)
"""
if
cube_path
is
None
:
# home_directory = home_directory
if
'OLAPY_PATH'
in
os
.
environ
:
home_directory
=
os
.
environ
[
'OLAPY_PATH'
]
else
:
from
os.path
import
expanduser
home_directory
=
expanduser
(
"~"
)
if
cube_path
is
None
:
self
.
cube_path
=
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
'cubes'
)
else
:
self
.
cube_path
=
cube_path
self
.
file_name
=
file_name
self
.
web_config_file_name
=
web_config_file_name
...
...
setup.py
View file @
93df06cd
...
...
@@ -29,7 +29,7 @@ setup(
install_requires
=
install_requires
,
include_package_data
=
False
,
# cmdclass={
#
#
'develop': PostDevelopCommand,
# 'develop': PostDevelopCommand,
# 'install': PostInstallCommand,
# },
classifiers
=
[
...
...
@@ -42,7 +42,13 @@ setup(
],)
if
RUNNING_TOX
:
# if RUNNING_TOX:
# home_directory = os.environ.get('HOME_DIR')
# else:
# home_directory = expanduser("~")
if
'OLAPY_PATH'
in
os
.
environ
:
home_directory
=
os
.
environ
[
'OLAPY_PATH'
]
elif
RUNNING_TOX
:
home_directory
=
os
.
environ
.
get
(
'HOME_DIR'
)
else
:
home_directory
=
expanduser
(
"~"
)
...
...
@@ -55,5 +61,3 @@ if not os.path.isdir(os.path.join(home_directory, 'olapy-data', 'cubes')):
if
not
os
.
path
.
isfile
(
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
'olapy-config.xml'
)):
copyfile
(
'config/olapy-config.xml'
,
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
'olapy-config.xml'
))
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