Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
settingsd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
settingsd
Commits
befff3ae
Commit
befff3ae
authored
Apr 16, 2019
by
Никита Ефремов
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added pre install hook
parent
ac92eb4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
setup.py
setup.py
+10
-2
No files found.
setup.py
View file @
befff3ae
...
...
@@ -30,8 +30,8 @@ for maps_list_item in ( ("share/settingsd/plugins/functions", "plugins/functions
(
"share/settingsd/data/customs"
,
"data/customs"
),
(
"/etc/settingsd"
,
"configs/settingsd"
)
)
:
data_files_list
.
append
((
maps_list_item
[
0
],
[
os
.
path
.
join
(
maps_list_item
[
1
],
item
)
for
item
in
os
.
listdir
(
maps_list_item
[
1
])
if
not
item
in
(
".gitignore"
,
)
]
))
data_files_list
.
append
((
maps_list_item
[
0
],
[
os
.
path
.
join
(
maps_list_item
[
1
],
item
)
for
item
in
os
.
listdir
(
maps_list_item
[
1
])
if
os
.
path
.
isfile
(
maps_list_item
[
1
]
+
'/'
+
item
)
and
item
not
in
(
".gitignore"
,
"__pycache__"
)
]
))
#####
...
...
@@ -58,12 +58,20 @@ class SettingsdInstall(install) :
### Public ###
def
run
(
self
)
:
self
.
preInstallHook
()
install
.
run
(
self
)
self
.
postInstallHooks
()
### Private ###
def
preInstallHook
(
self
):
log
.
info
(
"running pre-install hooks"
)
for
data_item
in
data_files_list
:
if
not
os
.
path
.
exists
(
self
.
install_data
+
"/"
+
data_item
[
0
]):
os
.
makedirs
(
self
.
install_data
+
"/"
+
data_item
[
0
])
def
postInstallHooks
(
self
)
:
# FIXME: This is dirty hack. In normal realization, this code must be moved to build stage
...
...
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