Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
08fb925b
Commit
08fb925b
authored
Aug 21, 2015
by
Ehsan Azarnasab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
always clean up dist folder to have a clean sdist and clean builds
parent
a61a8d56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
setup.py
setup.py
+21
-7
No files found.
setup.py
View file @
08fb925b
...
...
@@ -245,6 +245,25 @@ def copy_file(src, dst):
shutil
.
copy2
(
src
,
dst
)
def
clean_dist
():
"""re-create the dist folder
"""
dist_dir
=
os
.
path
.
join
(
script_dir
,
"./dist"
)
if
os
.
path
.
exists
(
dist_dir
):
log
.
info
(
'Removing distribution directory
%
s'
%
dist_dir
)
rmtree
(
dist_dir
)
dist_dir
=
os
.
path
.
join
(
script_dir
,
"./dist/dlib"
)
try
:
os
.
makedirs
(
dist_dir
)
except
OSError
:
pass
# always start with a clean slate
clean_dist
()
# noinspection PyPep8Naming
class
build
(
_build
):
def
run
(
self
):
...
...
@@ -252,11 +271,6 @@ class build(_build):
if
not
repackage
:
self
.
build_dlib
()
dist_dir
=
os
.
path
.
join
(
script_dir
,
"dist"
)
if
os
.
path
.
exists
(
dist_dir
):
log
.
info
(
'Removing distribution directory
%
s'
%
dist_dir
)
rmtree
(
dist_dir
)
# this is where the extension examples go
dist_dir_examples
=
os
.
path
.
join
(
script_dir
,
"./dist/dlib/examples"
)
try
:
...
...
@@ -265,8 +279,8 @@ class build(_build):
pass
# this is where the extension goes
log
.
info
(
'Populating the distribution directory
%
s ...'
%
dist_dir
)
dist_dir
=
os
.
path
.
join
(
script_dir
,
"./dist/dlib"
)
log
.
info
(
'Populating the distribution directory
%
s ...'
%
dist_dir
)
# create the module init files
with
open
(
os
.
path
.
join
(
dist_dir
,
'__init__.py'
),
'w'
)
as
f
:
...
...
@@ -385,7 +399,7 @@ setup(
author_email
=
'davis@dlib.net'
,
url
=
'https://github.com/davisking/dlib'
,
license
=
'Boost Software License'
,
packages
=
[
'dlib'
,
'dlib.examples'
],
packages
=
[
'dlib'
],
package_dir
=
{
''
:
'dist'
},
include_package_data
=
True
,
cmdclass
=
{
...
...
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