FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-javaobj/setup.py at master · tcalmant/python-javaobj · GitHub
tcalmant
/
python-javaobj
Public
Notifications
You must be signed in to change notification settings
Fork
19
Star
84
Code
Issues
2
Pull requests
0
Actions
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python-javaobj
/
setup.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
57 lines (49 loc) · 2.05 KB
Breadcrumbs
python-javaobj
/
setup.py
Copy path
File metadata and controls
57 lines (49 loc) · 2.05 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
#!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Installation script.
All project metadata lives in ``pyproject.toml`` (the ``[project]`` table),
which is read by setuptools 61+ and by every PEP 517 build front-end. On
Python 3 this file therefore only calls ``setup()`` with no argument.
Python 2.7 ships a setuptools too old to understand that table, so when this
file is executed directly on Python 2 (``python setup.py install``) it
supplies the metadata explicitly. The version is read from
``javaobj/__init__.py`` so that it is never declared a second time.
:authors: Volodymyr Buell, Thomas Calmant
:license: Apache License 2.0
"""
import
io
import
re
import
sys
from
setuptools
import
setup
if
sys
.
version_info
[
0
]
<
3
:
# Python 2.7: old setuptools cannot read [project] from pyproject.toml,
# so the metadata is given here. The version is parsed from the package
# to avoid a second source of truth.
with
io
.
open
(
"javaobj/__init__.py"
,
encoding
=
"utf-8"
)
as
fh
:
_match
=
re
.
search
(
r"__version_info__\s*=\s*\(([^)]*)\)"
,
fh
.
read
())
_version
=
"."
.
join
(
part
.
strip
()
for
part
in
_match
.
group
(
1
).
split
(
","
))
with
io
.
open
(
"README.md"
,
encoding
=
"utf-8"
)
as
fh
:
_long_description
=
fh
.
read
()
setup
(
name
=
"javaobj-py3"
,
version
=
_version
,
author
=
"Volodymyr Buell"
,
author_email
=
"vbuell@gmail.com"
,
maintainer
=
"Thomas Calmant"
,
maintainer_email
=
"thomas.calmant@gmail.com"
,
url
=
"https://github.com/tcalmant/python-javaobj"
,
description
=
"Module for serializing and de-serializing Java objects."
,
long_description
=
_long_description
,
long_description_content_type
=
"text/markdown"
,
license
=
"Apache License 2.0"
,
keywords
=
"python java marshalling serialization"
,
packages
=
[
"javaobj"
,
"javaobj.v1"
,
"javaobj.v2"
,
"javaobj.v3"
],
install_requires
=
[
"enum34; python_version<'3.4'"
,
"typing; python_version<'3.5'"
,
],
)
else
:
# Python 3: setuptools reads everything from pyproject.toml
setup
()
Back
|
FazBrowse Home
|
New Git URL