Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pim_dm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
pim_dm
Commits
b3a3cd07
Commit
b3a3cd07
authored
Feb 16, 2024
by
Thomas Gambier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup.py: fix for sdist
We don't want to run cython just for preparing sources.
parent
79369637
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
setup.py
setup.py
+19
-8
No files found.
setup.py
View file @
b3a3cd07
import
sys
from
setuptools
import
setup
,
find_packages
,
Extension
from
distutils.command.build
import
build
as
build_orig
try
:
from
Cython.Build
import
cythonize
except
ModuleNotFoundError
:
raise
SystemExit
(
"Cython is required. You can install it with pip."
)
# we only support Python 3 version >= 3.3
if
len
(
sys
.
argv
)
>=
2
and
sys
.
argv
[
1
]
==
"install"
and
sys
.
version_info
<
(
3
,
3
):
raise
SystemExit
(
"Python 3.3 or higher is required"
)
class
build
(
build_orig
):
def
finalize_options
(
self
):
super
().
finalize_options
()
if
'sdist'
in
sys
.
argv
:
return
try
:
from
Cython.Build
import
cythonize
except
ModuleNotFoundError
:
raise
SystemExit
(
"Cython is required. You can install it with pip."
)
self
.
distribution
.
ext_modules
=
cythonize
(
self
.
distribution
.
ext_modules
,
language_level
=
3
)
setup
(
name
=
"pim-dm"
,
...
...
@@ -23,6 +32,7 @@ setup(
author
=
"Pedro Oliveira"
,
author_email
=
"pedro.francisco.oliveira@tecnico.ulisboa.pt"
,
license
=
"MIT"
,
cmdclass
=
{
"build"
:
build
},
install_requires
=
[
'PrettyTable'
,
'netifaces'
,
...
...
@@ -32,10 +42,11 @@ setup(
'igmp==1.0.4'
,
],
packages
=
find_packages
(
exclude
=
[
"docs"
]),
ext_modules
=
cythonize
([
Extension
(
"pcap_wrapper"
,
[
"pcap.pyx"
],
libraries
=
[
"pcap"
]),
],
language_level
=
3
),
ext_modules
=
[
Extension
(
name
=
"pcap_wrapper"
,
sources
=
[
"pcap.pyx"
],
libraries
=
[
"pcap"
],
)],
entry_points
=
{
"console_scripts"
:
[
"pim-dm = pimdm.Run:main"
,
...
...
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