FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
msgpack/python/setup.py at java-0.5.1 · WanderWalker/msgpack · GitHub
WanderWalker
msgpack
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
msgpack
/
python
/
setup.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
77 lines (64 loc) · 2.3 KB
Breadcrumbs
msgpack
/
python
/
setup.py
Copy path
File metadata and controls
executable file
·
77 lines (64 loc) · 2.3 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
#!/usr/bin/env python
# coding: utf-8
version
=
(
0
,
1
,
6
,
'final'
)
import
os
from
glob
import
glob
from
distutils
.
core
import
setup
,
Extension
from
distutils
.
command
.
sdist
import
sdist
try
:
from
Cython
.
Distutils
import
build_ext
import
Cython
.
Compiler
.
Main
as
cython_compiler
have_cython
=
True
except
ImportError
:
from
distutils
.
command
.
build_ext
import
build_ext
have_cython
=
False
# make msgpack/__verison__.py
f
=
open
(
'msgpack/__version__.py'
,
'w'
)
f
.
write
(
"version = %r
\n
"
%
(
version
,))
f
.
close
()
version_str
=
'.'
.
join
(
str
(
x
)
for
x
in
version
[:
3
])
if
len
(
version
)
>
3
and
version
[
3
]
!=
'final'
:
version_str
+=
version
[
3
]
# take care of extension modules.
if
have_cython
:
sources
=
[
'msgpack/_msgpack.pyx'
]
class
Sdist
(
sdist
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
for
src
in
glob
(
'msgpack/*.pyx'
):
cython_compiler
.
compile
(
glob
(
'msgpack/*.pyx'
),
cython_compiler
.
default_options
)
sdist
.
__init__
(
self
,
*
args
,
**
kwargs
)
else
:
sources
=
[
'msgpack/_msgpack.c'
]
for
f
in
sources
:
if
not
os
.
path
.
exists
(
f
):
raise
ImportError
(
"Building msgpack from VCS needs Cython. Install Cython or use sdist package."
)
Sdist
=
sdist
msgpack_mod
=
Extension
(
'msgpack._msgpack'
,
sources
=
sources
,
)
del
sources
desc
=
'MessagePack (de)serializer.'
long_desc
=
"""MessagePack (de)serializer for Python.
What's MessagePack? (from http://msgpack.sourceforge.net/)
MessagePack is a binary-based efficient data interchange format that is
focused on high performance. It is like JSON, but very fast and small.
"""
setup
(
name
=
'msgpack-python'
,
author
=
'INADA Naoki'
,
author_email
=
'songofacandy@gmail.com'
,
version
=
version_str
,
cmdclass
=
{
'build_ext'
:
build_ext
,
'sdist'
:
Sdist
},
ext_modules
=
[
msgpack_mod
],
packages
=
[
'msgpack'
],
description
=
desc
,
long_description
=
long_desc
,
url
=
'http://msgpack.sourceforge.net/'
,
download_url
=
'http://pypi.python.org/pypi/msgpack/'
,
classifiers
=
[
'Programming Language :: Python :: 3'
,
'Development Status :: 4 - Beta'
,
'Intended Audience :: Developers'
,
'License :: OSI Approved :: Apache Software License'
,
]
)
Back
|
FazBrowse Home
|
New Git URL