Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
0
Merge Requests
0
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
Nurlan
eepm
Commits
f51b0d50
Commit
f51b0d50
authored
Oct 29, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-restore: add requirements_dev.txt support
parent
2cde1d57
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
epm-restore
bin/epm-restore
+12
-5
No files found.
bin/epm-restore
View file @
f51b0d50
...
@@ -46,7 +46,12 @@ fill_sign()
...
@@ -46,7 +46,12 @@ fill_sign()
__epm_restore_pip
()
__epm_restore_pip
()
{
{
local
req_file
=
"
$1
"
local
req_file
=
"
$1
"
[
-n
"
$dryrun
"
]
||
info
"Install requirements from
$req_file
..."
if
[
-n
"
$dryrun
"
]
;
then
echo
echo
"# generated by epm --restore --dry-run from
$(
basename
$(
dirname
$(
realpath
$req_file
)))
/
$req_file
"
else
info
"Install requirements from
$req_file
..."
fi
local
ilist
=
''
local
ilist
=
''
while
read
l
;
do
while
read
l
;
do
...
@@ -72,6 +77,8 @@ __epm_restore_pip()
...
@@ -72,6 +77,8 @@ __epm_restore_pip()
continue
continue
fi
fi
if
[
-n
"
$dryrun
"
]
;
then
if
[
-n
"
$dryrun
"
]
;
then
local
reqmacro
=
"%py3_use"
[
"
$(
basename
"
$req_file
"
)
"
=
"requirements_dev.txt"
]
&&
reqmacro
=
"%py3_buildrequires"
local
pi
=
''
local
pi
=
''
local
sign ll
local
sign ll
for
sign
in
"<="
"<"
">="
">"
"=="
"!="
;
do
for
sign
in
"<="
"<"
">="
">"
"=="
"!="
;
do
...
@@ -81,9 +88,9 @@ __epm_restore_pip()
...
@@ -81,9 +88,9 @@ __epm_restore_pip()
[
"
$sign
"
=
"!="
]
&&
sign
=
">="
[
"
$sign
"
=
"!="
]
&&
sign
=
">="
[
-n
"
$pi
"
]
&&
pi
=
"
$pi
[
-n
"
$pi
"
]
&&
pi
=
"
$pi
"
"
pi
=
"
$pi
%py3_use
$t
$sign
$ll
"
pi
=
"
$pi
$reqmacro
$t
$sign
$ll
"
done
done
[
-n
"
$pi
"
]
||
pi
=
"
%py3_use
$t
"
[
-n
"
$pi
"
]
||
pi
=
"
$reqmacro
$t
"
echo
"
$pi
"
echo
"
$pi
"
continue
continue
else
else
...
@@ -122,7 +129,7 @@ __epm_restore_by()
...
@@ -122,7 +129,7 @@ __epm_restore_by()
fi
fi
case
$(
basename
$req_file
)
in
case
$(
basename
$req_file
)
in
requirements.txt|requires.txt
)
requirements.txt|require
ments_dev.txt|require
s.txt
)
[
-s
"
$req_file
"
]
&&
__epm_restore_pip
"
$req_file
"
[
-s
"
$req_file
"
]
&&
__epm_restore_pip
"
$req_file
"
;;
;;
Gemfile|package.json
)
Gemfile|package.json
)
...
@@ -151,7 +158,7 @@ epm_restore()
...
@@ -151,7 +158,7 @@ epm_restore()
# TODO: nowhere works: python3 setup.py --requires
# TODO: nowhere works: python3 setup.py --requires
# if run with empty args
# if run with empty args
for
i
in
requirements.txt Gemfile requires.txt
;
do
for
i
in
requirements.txt
requirements_dev.txt
Gemfile requires.txt
;
do
__epm_restore_by
$i
__epm_restore_by
$i
done
done
...
...
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