Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PaNOSC
Data Analysis Services
packme
Commits
9b63ba84
Commit
9b63ba84
authored
Jan 22, 2020
by
Eric Pellegrini
Browse files
added stub files to setuptools process
parent
2b05f079
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
9b63ba84
import
glob
import
os
from
distutils.util
import
convert_path
from
setuptools
import
find_packages
,
setup
def
find_data
(
where
=
"."
,
exclude
=
None
,
exclude_directories
=
None
,
prefix
=
""
):
if
exclude
is
None
:
exclude
=
[]
if
exclude_directories
is
None
:
exclude_directories
=
[]
out
=
{}
stack
=
[
convert_path
(
where
)]
while
stack
:
where
=
stack
.
pop
(
0
)
for
name
in
os
.
listdir
(
where
):
fn
=
os
.
path
.
join
(
where
,
name
)
d
=
os
.
path
.
join
(
prefix
,
os
.
path
.
dirname
(
fn
))
if
os
.
path
.
isdir
(
fn
):
stack
.
append
(
fn
)
else
:
bad_name
=
False
for
pattern
in
exclude
:
if
(
fnmatch
.
fnmatchcase
(
name
,
pattern
)
or
fn
.
lower
()
==
pattern
.
lower
()):
bad_name
=
True
break
if
bad_name
:
continue
out
.
setdefault
(
d
,
[]).
append
(
fn
)
out
=
[(
k
,
v
)
for
k
,
v
in
out
.
items
()]
return
out
name
=
"packme"
# Read the package metadata first
pkginfo
=
{}
exec
(
open
(
"src/packme/__pkginfo__.py"
,
"r"
).
read
(),{},
pkginfo
)
from
setuptools
import
find_packages
,
setup
# Set up the sphinx documentation command
cmdclass
=
{}
command_options
=
{}
...
...
@@ -28,6 +60,8 @@ with open("README.md","r") as f:
packages
=
find_packages
(
"src"
)
data_files
=
find_data
(
"stubs"
)
# Copy the scripts
scripts_dir
=
"scripts"
scripts
=
glob
.
glob
(
os
.
path
.
join
(
scripts_dir
,
'*'
))
...
...
@@ -51,4 +85,5 @@ setup(name = name,
cmdclass
=
cmdclass
,
scripts
=
scripts
,
command_options
=
command_options
,
data_files
=
data_files
)
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