Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
Jérome Perrin
setuptools
Commits
fbf26248
Commit
fbf26248
authored
Feb 09, 2014
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed Features functionality. Fixes #65.
parent
65b76ae3
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
341 deletions
+6
-341
CHANGES.txt
CHANGES.txt
+1
-0
setuptools/__init__.py
setuptools/__init__.py
+2
-2
setuptools/dist.py
setuptools/dist.py
+3
-256
setuptools/tests/__init__.py
setuptools/tests/__init__.py
+0
-83
No files found.
CHANGES.txt
View file @
fbf26248
...
...
@@ -18,6 +18,7 @@ CHANGES
tarball. This approach avoids the potential security vulnerabilities
presented by use of tar files. It also leverages the security features added
to ZipFile.extract in Python 2.7.4.
* Issue #65: Removed deprecated Features functionality.
---
2.3
...
...
setuptools/__init__.py
View file @
fbf26248
...
...
@@ -9,11 +9,11 @@ from distutils.util import convert_path
import
setuptools.version
from
setuptools.extension
import
Extension
from
setuptools.dist
import
Distribution
,
Feature
,
_get_unpatched
from
setuptools.dist
import
Distribution
,
_get_unpatched
from
setuptools.depends
import
Require
__all__
=
[
'setup'
,
'Distribution'
,
'
Feature'
,
'
Command'
,
'Extension'
,
'Require'
,
'setup'
,
'Distribution'
,
'Command'
,
'Extension'
,
'Require'
,
'find_packages'
]
...
...
setuptools/dist.py
View file @
fbf26248
This diff is collapsed.
Click to expand it.
setuptools/tests/__init__.py
View file @
fbf26248
...
...
@@ -231,89 +231,6 @@ class DistroTests(unittest.TestCase):
self
.
dist
.
exclude
,
package_dir
=
[
'q'
]
)
class
FeatureTests
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
req
=
Require
(
'Distutils'
,
'1.0.3'
,
'distutils'
)
self
.
dist
=
makeSetup
(
features
=
{
'foo'
:
Feature
(
"foo"
,
standard
=
True
,
require_features
=
[
'baz'
,
self
.
req
]),
'bar'
:
Feature
(
"bar"
,
standard
=
True
,
packages
=
[
'pkg.bar'
],
py_modules
=
[
'bar_et'
],
remove
=
[
'bar.ext'
],
),
'baz'
:
Feature
(
"baz"
,
optional
=
False
,
packages
=
[
'pkg.baz'
],
scripts
=
[
'scripts/baz_it'
],
libraries
=
[(
'libfoo'
,
'foo/foofoo.c'
)]
),
'dwim'
:
Feature
(
"DWIM"
,
available
=
False
,
remove
=
'bazish'
),
},
script_args
=
[
'--without-bar'
,
'install'
],
packages
=
[
'pkg.bar'
,
'pkg.foo'
],
py_modules
=
[
'bar_et'
,
'bazish'
],
ext_modules
=
[
Extension
(
'bar.ext'
,[
'bar.c'
])]
)
def
testDefaults
(
self
):
self
.
assertTrue
(
not
Feature
(
"test"
,
standard
=
True
,
remove
=
'x'
,
available
=
False
).
include_by_default
()
)
self
.
assertTrue
(
Feature
(
"test"
,
standard
=
True
,
remove
=
'x'
).
include_by_default
()
)
# Feature must have either kwargs, removes, or require_features
self
.
assertRaises
(
DistutilsSetupError
,
Feature
,
"test"
)
def
testAvailability
(
self
):
self
.
assertRaises
(
DistutilsPlatformError
,
self
.
dist
.
features
[
'dwim'
].
include_in
,
self
.
dist
)
def
testFeatureOptions
(
self
):
dist
=
self
.
dist
self
.
assertTrue
(
(
'with-dwim'
,
None
,
'include DWIM'
)
in
dist
.
feature_options
)
self
.
assertTrue
(
(
'without-dwim'
,
None
,
'exclude DWIM (default)'
)
in
dist
.
feature_options
)
self
.
assertTrue
(
(
'with-bar'
,
None
,
'include bar (default)'
)
in
dist
.
feature_options
)
self
.
assertTrue
(
(
'without-bar'
,
None
,
'exclude bar'
)
in
dist
.
feature_options
)
self
.
assertEqual
(
dist
.
feature_negopt
[
'without-foo'
],
'with-foo'
)
self
.
assertEqual
(
dist
.
feature_negopt
[
'without-bar'
],
'with-bar'
)
self
.
assertEqual
(
dist
.
feature_negopt
[
'without-dwim'
],
'with-dwim'
)
self
.
assertTrue
(
not
'without-baz'
in
dist
.
feature_negopt
)
def
testUseFeatures
(
self
):
dist
=
self
.
dist
self
.
assertEqual
(
dist
.
with_foo
,
1
)
self
.
assertEqual
(
dist
.
with_bar
,
0
)
self
.
assertEqual
(
dist
.
with_baz
,
1
)
self
.
assertTrue
(
not
'bar_et'
in
dist
.
py_modules
)
self
.
assertTrue
(
not
'pkg.bar'
in
dist
.
packages
)
self
.
assertTrue
(
'pkg.baz'
in
dist
.
packages
)
self
.
assertTrue
(
'scripts/baz_it'
in
dist
.
scripts
)
self
.
assertTrue
((
'libfoo'
,
'foo/foofoo.c'
)
in
dist
.
libraries
)
self
.
assertEqual
(
dist
.
ext_modules
,[])
self
.
assertEqual
(
dist
.
require_features
,
[
self
.
req
])
# If we ask for bar, it should fail because we explicitly disabled
# it on the command line
self
.
assertRaises
(
DistutilsOptionError
,
dist
.
include_feature
,
'bar'
)
def
testFeatureWithInvalidRemove
(
self
):
self
.
assertRaises
(
SystemExit
,
makeSetup
,
features
=
{
'x'
:
Feature
(
'x'
,
remove
=
'y'
)}
)
class
TestCommandTests
(
unittest
.
TestCase
):
def
testTestIsCommand
(
self
):
...
...
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