Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
nexedi
re6stnet
Commits
ff35c2f4
Commit
ff35c2f4
authored
May 16, 2024
by
Tom Niget
Committed by
Tom Niget
Jun 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: migrate setup.py
parent
eb9a0971
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
setup.py
setup.py
+7
-4
No files found.
setup.py
View file @
ff35c2f4
...
@@ -15,10 +15,10 @@ def copy_file(self, infile, outfile, *args, **kw):
...
@@ -15,10 +15,10 @@ def copy_file(self, infile, outfile, *args, **kw):
if
infile
==
version
[
"__file__"
]:
if
infile
==
version
[
"__file__"
]:
if
not
self
.
dry_run
:
if
not
self
.
dry_run
:
log
.
info
(
"generating %s -> %s"
,
infile
,
outfile
)
log
.
info
(
"generating %s -> %s"
,
infile
,
outfile
)
with
open
(
outfile
,
"w
"
,
encoding
=
"utf-8
"
)
as
f
:
with
open
(
outfile
,
"w
b
"
)
as
f
:
for
x
in
sorted
(
version
.
items
()):
for
x
in
sorted
(
version
.
items
()):
if
not
x
[
0
].
startswith
(
"_"
):
if
not
x
[
0
].
startswith
(
"_"
):
f
.
write
(
"%s = %r
\
n
"
%
x
)
f
.
write
(
(
"%s = %r
\
n
"
%
x
).
encode
()
)
return
outfile
,
1
return
outfile
,
1
elif
isinstance
(
self
,
build_py
)
and
\
elif
isinstance
(
self
,
build_py
)
and
\
os
.
stat
(
infile
).
st_mode
&
stat
.
S_IEXEC
:
os
.
stat
(
infile
).
st_mode
&
stat
.
S_IEXEC
:
...
@@ -33,8 +33,11 @@ def copy_file(self, infile, outfile, *args, **kw):
...
@@ -33,8 +33,11 @@ def copy_file(self, infile, outfile, *args, **kw):
executable
=
self
.
distribution
.
command_obj
[
'build'
].
executable
executable
=
self
.
distribution
.
command_obj
[
'build'
].
executable
patched
=
"#!%s%s
\
n
"
%
(
executable
,
m
.
group
(
1
)
or
''
)
patched
=
"#!%s%s
\
n
"
%
(
executable
,
m
.
group
(
1
)
or
''
)
patched
+=
src
.
read
()
patched
+=
src
.
read
()
with
open
(
outfile
,
"w"
)
as
dst
:
dst
=
os
.
open
(
outfile
,
os
.
O_CREAT
|
os
.
O_WRONLY
|
os
.
O_TRUNC
)
dst
.
write
(
patched
)
try
:
os
.
write
(
dst
,
patched
.
encode
())
finally
:
os
.
close
(
dst
)
return
outfile
,
1
return
outfile
,
1
cls
,
=
self
.
__class__
.
__bases__
cls
,
=
self
.
__class__
.
__bases__
return
cls
.
copy_file
(
self
,
infile
,
outfile
,
*
args
,
**
kw
)
return
cls
.
copy_file
(
self
,
infile
,
outfile
,
*
args
,
**
kw
)
...
...
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