FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mlstatpy/setup.py at dev-pvalues · sdpython/mlstatpy · GitHub
sdpython
mlstatpy
Repository navigation
Code
Issues
10
(10)
Pull requests
1
(1)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
mlstatpy
/
setup.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
164 lines (139 loc) · 5.37 KB
Breadcrumbs
mlstatpy
/
setup.py
Copy path
File metadata and controls
164 lines (139 loc) · 5.37 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# -*- coding: utf-8 -*-
import
sys
import
os
from
distutils
.
core
import
setup
from
setuptools
import
find_packages
#########
# settings
#########
project_var_name
=
"mlstatpy"
versionPython
=
"%s.%s"
%
(
sys
.
version_info
.
major
,
sys
.
version_info
.
minor
)
path
=
"Lib/site-packages/"
+
project_var_name
readme
=
'README.rst'
history
=
'HISTORY.rst'
requirements
=
None
KEYWORDS
=
project_var_name
+
', Xavier Dupré'
DESCRIPTION
=
"""Lectures about machine learning, mathematics, statistics, programming."""
CLASSIFIERS
=
[
'Programming Language :: Python :: 3'
,
'Intended Audience :: Developers'
,
'Topic :: Scientific/Engineering'
,
'Topic :: Education'
,
'License :: OSI Approved :: MIT License'
,
'Development Status :: 5 - Production/Stable'
]
#######
# data
#######
packages
=
find_packages
(
'src'
,
exclude
=
'src'
)
package_dir
=
{
k
:
"src/"
+
k
.
replace
(
"."
,
"/"
)
for
k
in
packages
}
package_data
=
{}
############
# functions
############
def
ask_help
():
return
"--help"
in
sys
.
argv
or
"--help-commands"
in
sys
.
argv
def
is_local
():
file
=
os
.
path
.
abspath
(
__file__
).
replace
(
"
\\
"
,
"/"
).
lower
()
try
:
from
pyquickhelper
.
pycode
.
setup_helper
import
available_commands_list
except
ImportError
:
return
False
return
available_commands_list
(
sys
.
argv
)
def
verbose
():
print
(
"---------------------------------"
)
print
(
"package_dir ="
,
package_dir
)
print
(
"packages ="
,
packages
)
print
(
"package_data="
,
package_data
)
print
(
"current ="
,
os
.
path
.
abspath
(
os
.
getcwd
()))
print
(
"---------------------------------"
)
##########
# version
##########
if
is_local
()
and
not
ask_help
():
def
write_version
():
from
pyquickhelper
.
pycode
import
write_version_for_setup
return
write_version_for_setup
(
__file__
)
write_version
()
versiontxt
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"version.txt"
)
if
os
.
path
.
exists
(
versiontxt
):
with
open
(
versiontxt
,
"r"
)
as
f
:
lines
=
f
.
readlines
()
subversion
=
"."
+
lines
[
0
].
strip
(
"
\r
\n
"
)
if
subversion
==
".0"
:
raise
Exception
(
"Subversion is wrong: '{0}'."
.
format
(
subversion
))
else
:
raise
FileNotFoundError
(
versiontxt
)
else
:
# when the module is installed, no commit number is displayed
subversion
=
""
if
"upload"
in
sys
.
argv
and
not
subversion
and
not
ask_help
():
# avoid uploading with a wrong subversion number
raise
Exception
(
"Git version is empty, cannot upload, is_local()={0}"
.
format
(
is_local
()))
##############
# common part
##############
if
os
.
path
.
exists
(
readme
):
with
open
(
readme
,
"r"
,
encoding
=
'utf-8-sig'
)
as
f
:
long_description
=
f
.
read
()
else
:
long_description
=
""
if
os
.
path
.
exists
(
history
):
with
open
(
history
,
"r"
,
encoding
=
'utf-8-sig'
)
as
f
:
long_description
+=
f
.
read
()
if
"--verbose"
in
sys
.
argv
:
verbose
()
if
is_local
():
import
pyquickhelper
logging_function
=
pyquickhelper
.
get_fLOG
()
logging_function
(
OutputPrint
=
True
)
from
pyquickhelper
.
pycode
import
process_standard_options_for_setup
r
=
process_standard_options_for_setup
(
sys
.
argv
,
__file__
,
project_var_name
,
unittest_modules
=
[
"pyquickhelper"
,
"jyquickhelper"
,
"mlinsights"
],
additional_notebook_path
=
[
"pyquickhelper"
,
"pyensae"
,
"cpyquickhelper"
,
"pymyinstall"
,
"jyquickhelper"
,
"mlinsights"
],
additional_local_path
=
[
"pyquickhelper"
,
"pyensae"
,
"cpyquickhelper"
,
"pymyinstall"
,
"jyquickhelper"
,
"mlinsights"
],
requirements
=
[
"pyquickhelper"
,
"pymyinstall"
,
"cpyquickhelper"
,
"jyquickhelper"
,
"pyensae"
,
"mlinsights"
],
add_htmlhelp
=
sys
.
platform
.
startswith
(
"win"
),
coverage_options
=
dict
(
omit
=
[
"*exclude*.py"
]),
github_owner
=
"sdpython"
,
fLOG
=
logging_function
,
covtoken
=
(
"ab2da06c-1ff3-4875-97fa-145e594bd7f9"
,
"'_UT_37_std' in outfile"
))
if
not
r
and
not
({
"bdist_msi"
,
"sdist"
,
"bdist_wheel"
,
"publish"
,
"publish_doc"
,
"register"
,
"upload_docs"
,
"bdist_wininst"
,
"build_ext"
}
&
set
(
sys
.
argv
)):
raise
Exception
(
"unable to interpret command line: "
+
str
(
sys
.
argv
))
else
:
r
=
False
if
ask_help
():
from
pyquickhelper
.
pycode
import
process_standard_options_for_setup_help
process_standard_options_for_setup_help
(
sys
.
argv
)
if
not
r
:
if
len
(
sys
.
argv
)
in
(
1
,
2
)
and
sys
.
argv
[
-
1
]
in
(
"--help-commands"
,):
from
pyquickhelper
.
pycode
import
process_standard_options_for_setup_help
process_standard_options_for_setup_help
(
sys
.
argv
)
from
pyquickhelper
.
pycode
import
clean_readme
from
mlstatpy
import
__version__
as
sversion
long_description
=
clean_readme
(
long_description
)
setup
(
name
=
project_var_name
,
version
=
sversion
,
author
=
'Xavier Dupré'
,
author_email
=
'xavier.dupre@gmail.com'
,
license
=
"MIT"
,
url
=
"http://www.xavierdupre.fr/app/mlstatpy/helpsphinx/index.html"
,
download_url
=
"https://github.com/sdpython/mlstatpy/"
,
description
=
DESCRIPTION
,
long_description
=
long_description
,
keywords
=
KEYWORDS
,
classifiers
=
CLASSIFIERS
,
packages
=
packages
,
package_dir
=
package_dir
,
package_data
=
package_data
,
setup_requires
=
[
"pyquickhelper"
],
install_requires
=
[
'numpy>=1.16'
,
'scipy>=1.4'
,
'mlinsights>=0.2'
,
'cpyquickhelper>=0.2'
],
)
Back
|
FazBrowse Home
|
New Git URL