Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 74705157
authored
Jul 16, 2019
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
setup.py bisa pasang custom package tanpa opsi develop-use-pip
1 parent
ca297443
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
41 deletions
setup.py
setup.py
View file @
7470515
...
...
@@ -17,23 +17,13 @@ with open(os.path.join(here, 'CHANGES.txt')) as f:
line
=
CHANGES
.
splitlines
()[
0
]
version
=
line
.
split
()[
0
]
requires
=
[
requires
=
[
'pytz'
,
'sqlalchemy'
,
'ziggurat_foundations'
,
'psycopg2-binary'
,
'pyramid'
,
]
customs_require
=
[
'http://repo.opensipkd.com/pip/opensipkd-jsonrpc-0.1.tar.gz'
,
]
packages
=
[
'opensipkd.base'
,
'opensipkd.base.tools'
,
'opensipkd.base.models'
,
'opensipkd.base.rpc'
,
'opensipkd-jsonrpc @ git+https://git.opensipkd.com/sugiana/opensipkd-jsonrpc'
,
]
...
...
@@ -42,34 +32,6 @@ def run(cmd):
sys
.
exit
()
def
pip_install
(
package
,
upgrade
=
False
):
cmd
=
[
pip
,
'install'
]
if
upgrade
:
cmd
+=
[
'--upgrade'
]
if
sys
.
argv
[
2
:]:
option
=
sys
.
argv
[
2
]
# Bisa untuk proxy
cmd
+=
[
option
]
cmd
+=
[
package
]
run
(
cmd
)
if
sys
.
argv
[
1
:]
and
sys
.
argv
[
1
]
==
'develop-use-pip'
:
bin_
=
os
.
path
.
split
(
sys
.
executable
)[
0
]
pip
=
os
.
path
.
join
(
bin_
,
'pip'
)
pip_install
(
'pip'
,
True
)
pip_install
(
'setuptools'
,
True
)
requires_
=
requires
+
customs_require
for
package
in
requires_
:
if
sys
.
argv
[
2
:]:
cmd
=
[
pip
,
'install'
,
sys
.
argv
[
2
],
package
]
else
:
cmd
=
[
pip
,
'install'
,
package
]
run
(
cmd
)
cmd
=
[
sys
.
executable
,
sys
.
argv
[
0
],
'develop'
]
subprocess
.
call
(
cmd
)
sys
.
exit
()
setup
(
name
=
'opensipkd-base'
,
version
=
version
,
...
...
@@ -82,7 +44,7 @@ setup(
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application"
,
],
keywords
=
'web pyramid pylons'
,
packages
=
packages
,
packages
=
setuptools
.
find_packages
()
,
zip_safe
=
False
,
install_requires
=
requires
,
)
Write
Preview
Markdown
is supported
Attach a file
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 post a comment