Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
scc-net
netvs
netdb-client-lib
Commits
79bf4219
Commit
79bf4219
authored
Oct 02, 2020
by
janis.streib
🦉
Browse files
UPD: new version of api-generator
parent
64d33522
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
79bf4219
...
...
@@ -6,23 +6,18 @@ import py_compile
class
APIGenBuild
(
build_py
):
def
run
(
self
):
gen
=
subprocess
.
run
([
'net-api-generator'
,
'python'
],
check
=
True
,
capture_output
=
True
)
if
not
self
.
dry_run
:
target_dir
=
os
.
path
.
join
(
self
.
build_lib
,
'netdb_client'
)
self
.
mkpath
(
target_dir
)
with
open
(
os
.
path
.
join
(
target_dir
,
'__init__.py'
),
'wb'
)
as
fobj
:
fobj
.
write
(
gen
.
stdout
)
py_compile
.
compile
(
os
.
path
.
join
(
target_dir
,
'__init__.py'
))
target_dir
=
os
.
path
.
join
(
self
.
build_lib
,
'netdb_client'
)
self
.
mkpath
(
target_dir
)
gen
=
subprocess
.
run
([
'net-api-generator'
,
'python'
,
'--output-dir='
+
target_dir
],
check
=
True
)
build_py
.
run
(
self
)
setup
(
name
=
'netdb_client'
,
version
=
'1.0'
,
author
=
'Dr. Meta'
,
description
=
'This is a meta package to install the automatically generated NET-API 3.0 definitions.'
,
install_requires
=
[
'argparse'
],
install_requires
=
[
'argparse'
,
'requests'
],
packages
=
[
'netdb_client'
],
cmdclass
=
{
'build_py'
:
APIGenBuild
}
)
...
...
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