FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-json-patch/setup.py at master · graingert/python-json-patch · GitHub
graingert
/
python-json-patch
Public
forked from
stefankoegl/python-json-patch
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python-json-patch
/
setup.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
62 lines (53 loc) · 1.52 KB
Breadcrumbs
python-json-patch
/
setup.py
Copy path
File metadata and controls
62 lines (53 loc) · 1.52 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
#!/usr/bin/env python
import
sys
import
re
import
warnings
try
:
from
setuptools
import
setup
has_setuptools
=
True
except
ImportError
:
from
distutils
.
core
import
setup
has_setuptools
=
False
src
=
open
(
'jsonpatch.py'
).
read
()
metadata
=
dict
(
re
.
findall
(
"__([a-z]+)__ = '([^']+)'"
,
src
))
docstrings
=
re
.
findall
(
'"""([^"]*)"""'
,
src
,
re
.
MULTILINE
|
re
.
DOTALL
)
PACKAGE
=
'jsonpatch'
MODULES
=
(
'jsonpatch'
,
)
REQUIREMENTS
=
list
(
open
(
'requirements.txt'
))
if
sys
.
version_info
<
(
2
,
6
):
REQUIREMENTS
+=
[
'simplejson'
]
if
has_setuptools
:
OPTIONS
=
{
'install_requires'
:
REQUIREMENTS
}
else
:
if
sys
.
version_info
<
(
2
,
6
):
warnings
.
warn
(
'No setuptools installed. Be sure that you have '
'json or simplejson package installed'
)
OPTIONS
=
{}
AUTHOR_EMAIL
=
metadata
[
'author'
]
VERSION
=
metadata
[
'version'
]
WEBSITE
=
metadata
[
'website'
]
LICENSE
=
metadata
[
'license'
]
DESCRIPTION
=
docstrings
[
0
]
# Extract name and e-mail ("Firstname Lastname <mail@example.org>")
AUTHOR
,
EMAIL
=
re
.
match
(
r'(.*) <(.*)>'
,
AUTHOR_EMAIL
).
groups
()
setup
(
name
=
PACKAGE
,
version
=
VERSION
,
description
=
DESCRIPTION
,
author
=
AUTHOR
,
author_email
=
EMAIL
,
license
=
LICENSE
,
url
=
WEBSITE
,
py_modules
=
MODULES
,
package_data
=
{
''
: [
'requirements.txt'
]},
scripts
=
[
'bin/jsondiff'
,
'bin/jsonpatch'
],
entry_points
=
{
'console_scripts'
: [
'jsondiff = jsondiff:main'
,
'jsonpatch = jsonpatch:main'
,
]},
**
OPTIONS
)
Back
|
FazBrowse Home
|
New Git URL