Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
5691e177
Commit
5691e177
authored
Feb 25, 2011
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better sdist, use command for generating gitrev
parent
12c5182c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
setup.py
setup.py
+9
-3
No files found.
setup.py
View file @
5691e177
...
...
@@ -3,9 +3,6 @@ from distutils.sysconfig import get_python_lib
import
os
,
os
.
path
import
sys
if
'sdist'
in
sys
.
argv
and
sys
.
platform
!=
"win32"
and
os
.
path
.
isdir
(
'.git'
):
assert
os
.
system
(
"git show-ref -s HEAD > .gitrev"
)
==
0
if
sys
.
platform
==
"darwin"
:
# Don't create resource files on OS X tar.
os
.
environ
[
'COPY_EXTENDED_ATTRIBUTES_DISABLE'
]
=
'true'
...
...
@@ -18,6 +15,15 @@ def add_command_class(name, cls):
cmdclasses
[
name
]
=
cls
setup_args
[
'cmdclass'
]
=
cmdclasses
from
distutils.command.sdist
import
sdist
as
sdist_orig
class
sdist
(
sdist_orig
):
def
run
(
self
):
if
(
sys
.
platform
!=
"win32"
and
os
.
path
.
isdir
(
'.git'
)):
assert
os
.
system
(
"git show-ref -s HEAD > .gitrev"
)
==
0
sdist_orig
.
run
(
self
)
add_command_class
(
'sdist'
,
sdist
)
if
sys
.
version_info
[
0
]
>=
3
:
import
lib2to3.refactor
from
distutils.command.build_py
\
...
...
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