pyscaffold.contrib package¶
Subpackages¶
- pyscaffold.contrib.setuptools_scm package
- Submodules
- pyscaffold.contrib.setuptools_scm.discover module
- pyscaffold.contrib.setuptools_scm.git module
- pyscaffold.contrib.setuptools_scm.hacks module
- pyscaffold.contrib.setuptools_scm.hg module
- pyscaffold.contrib.setuptools_scm.integration module
- pyscaffold.contrib.setuptools_scm.utils module
- pyscaffold.contrib.setuptools_scm.version module
- pyscaffold.contrib.setuptools_scm.win_py31_compat module
- Module contents
Submodules¶
pyscaffold.contrib.ptr module¶
Copyright Jason R. Coombs
MIT-licenced
Implementation
-
class
pyscaffold.contrib.ptr.
CustomizedDist
(attrs=None)[source]¶ Bases:
setuptools.dist.Distribution
-
allow_hosts
= None¶
-
fetch_build_egg
(req)[source]¶ Specialized version of Distribution.fetch_build_egg that respects respects allow_hosts and index_url.
-
index_url
= None¶
-
-
class
pyscaffold.contrib.ptr.
PyTest
(dist, **kw)[source]¶ Bases:
setuptools.command.test.test
>>> import setuptools >>> dist = setuptools.Distribution() >>> cmd = PyTest(dist)
-
finalize_options
()[source]¶ Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option assignments from the command-line or from other commands have been done. Thus, this is the place to code option dependencies: if ‘foo’ depends on ‘bar’, then it is safe to set ‘foo’ from ‘bar’ as long as ‘foo’ still has the same value it was assigned in ‘initialize_options()’.
This method must be implemented by all command classes.
-
initialize_options
()[source]¶ Set default values for all the options that this command supports. Note that these defaults may be overridden by other commands, by the setup script, by config files, or by the command-line. Thus, this is not the place to code dependencies between options; generally, ‘initialize_options()’ implementations are just a bunch of “self.foo = None” assignments.
This method must be implemented by all command classes.
-
install_extra_dists
(dist)[source]¶ Install extras that are indicated by markers or install all extras if ‘–extras’ is indicated.
-
static
marker_passes
(marker)[source]¶ Given an environment marker, return True if the marker is valid and matches this environment.
-
static
paths_on_pythonpath
(paths)[source]¶ Backward compatibility for paths_on_pythonpath; Returns a null context if paths_on_pythonpath is not implemented in orig.test. Note that this also means that the paths iterable is never consumed, which incidentally means that the None values from dist.fetch_build_eggs in older Setuptools will be disregarded.
-
run
()[source]¶ Override run to ensure requirements are available in this session (but don’t install them anywhere).
-
user_options
= [('extras', None, 'Install (all) setuptools extras when running tests'), ('index-url=', None, 'Specify an index url from which to retrieve dependencies'), ('allow-hosts=', None, 'Whitelist of comma-separated hosts to allow when retrieving dependencies'), ('addopts=', None, 'Additional options to be passed verbatim to the pytest runner')]¶
-
pyscaffold.contrib.six module¶
Utilities for writing code that runs on Python 2 and 3
-
class
pyscaffold.contrib.six.
Module_six_moves_urllib
[source]¶ Bases:
module
Create a six.moves.urllib namespace that resembles the Python 3 namespace
-
error
= <module 'pyscaffold.contrib.six.moves.urllib.error'>¶
-
parse
= <module 'pyscaffold.contrib.six.moves.urllib_parse'>¶
-
request
= <module 'pyscaffold.contrib.six.moves.urllib.request'>¶
-
response
= <module 'pyscaffold.contrib.six.moves.urllib.response'>¶
-
robotparser
= <module 'pyscaffold.contrib.six.moves.urllib.robotparser'>¶
-
-
class
pyscaffold.contrib.six.
Module_six_moves_urllib_error
(name)[source]¶ Bases:
pyscaffold.contrib.six._LazyModule
Lazy loading of moved objects in six.moves.urllib_error
-
ContentTooShortError
¶
-
HTTPError
¶
-
URLError
¶
-
-
class
pyscaffold.contrib.six.
Module_six_moves_urllib_parse
(name)[source]¶ Bases:
pyscaffold.contrib.six._LazyModule
Lazy loading of moved objects in six.moves.urllib_parse
-
ParseResult
¶
-
SplitResult
¶
-
parse_qs
¶
-
parse_qsl
¶
-
quote
¶
-
quote_plus
¶
-
splitquery
¶
-
splittag
¶
-
splituser
¶
-
splitvalue
¶
-
unquote
¶
-
unquote_plus
¶
-
unquote_to_bytes
¶
-
urldefrag
¶
-
urlencode
¶
-
urljoin
¶
-
urlparse
¶
-
urlsplit
¶
-
urlunparse
¶
-
urlunsplit
¶
-
uses_fragment
¶
-
uses_netloc
¶
-
uses_params
¶
-
uses_query
¶
-
uses_relative
¶
-
-
class
pyscaffold.contrib.six.
Module_six_moves_urllib_request
(name)[source]¶ Bases:
pyscaffold.contrib.six._LazyModule
Lazy loading of moved objects in six.moves.urllib_request
-
AbstractBasicAuthHandler
¶
-
AbstractDigestAuthHandler
¶
-
BaseHandler
¶
-
CacheFTPHandler
¶
-
FTPHandler
¶
-
FancyURLopener
¶
-
FileHandler
¶
-
HTTPBasicAuthHandler
¶
-
HTTPCookieProcessor
¶
-
HTTPDefaultErrorHandler
¶
-
HTTPDigestAuthHandler
¶
-
HTTPErrorProcessor
¶
-
HTTPHandler
¶
-
HTTPPasswordMgr
¶
-
HTTPPasswordMgrWithDefaultRealm
¶
-
HTTPRedirectHandler
¶
-
HTTPSHandler
¶
-
OpenerDirector
¶
-
ProxyBasicAuthHandler
¶
-
ProxyDigestAuthHandler
¶
-
ProxyHandler
¶
-
Request
¶
-
URLopener
¶
-
UnknownHandler
¶
-
build_opener
¶
-
getproxies
¶
-
install_opener
¶
-
parse_http_list
¶
-
parse_keqv_list
¶
-
pathname2url
¶
-
proxy_bypass
¶
-
url2pathname
¶
-
urlcleanup
¶
-
urlopen
¶
-
urlretrieve
¶
-
-
class
pyscaffold.contrib.six.
Module_six_moves_urllib_response
(name)[source]¶ Bases:
pyscaffold.contrib.six._LazyModule
Lazy loading of moved objects in six.moves.urllib_response
-
addbase
¶
-
addclosehook
¶
-
addinfo
¶
-
addinfourl
¶
-
-
class
pyscaffold.contrib.six.
Module_six_moves_urllib_robotparser
(name)[source]¶ Bases:
pyscaffold.contrib.six._LazyModule
Lazy loading of moved objects in six.moves.urllib_robotparser
-
RobotFileParser
¶
-
-
class
pyscaffold.contrib.six.
MovedAttribute
(name, old_mod, new_mod, old_attr=None, new_attr=None)[source]¶ Bases:
pyscaffold.contrib.six._LazyDescr
-
class
pyscaffold.contrib.six.
MovedModule
(name, old, new=None)[source]¶ Bases:
pyscaffold.contrib.six._LazyDescr
-
pyscaffold.contrib.six.
add_metaclass
(metaclass)[source]¶ Class decorator for creating a class with a metaclass.
-
pyscaffold.contrib.six.
get_unbound_function
(unbound)[source]¶ Get the function out of a possibly unbound function
-
pyscaffold.contrib.six.
int2byte
()¶ S.pack(v1, v2, …) -> bytes
Return a bytes object containing values v1, v2, … packed according to the format string S.format. See help(struct) for more on format strings.
-
pyscaffold.contrib.six.
iteritems
(d, **kw)[source]¶ Return an iterator over the (key, value) pairs of a dictionary.
-
pyscaffold.contrib.six.
iterlists
(d, **kw)[source]¶ Return an iterator over the (key, [values]) pairs of a dictionary.
-
pyscaffold.contrib.six.
itervalues
(d, **kw)[source]¶ Return an iterator over the values of a dictionary.
-
pyscaffold.contrib.six.
python_2_unicode_compatible
(klass)[source]¶ A decorator that defines __unicode__ and __str__ methods under Python 2. Under Python 3 it does nothing.
To support Python 2 and 3 with a single code base, define a __str__ method returning text and apply this decorator to the class.
Module contents¶
Contribution packages used by PyScaffold
All packages inside contrib
are external packages that come with their
own licences and are not part of the PyScaffold source code itself.
The reason for shipping these dependencies directly is to avoid problems in
the resolution of setup_requires
dependencies that occurred more often
than not, see issues #71 and #72.
Currently the contrib packages are:
- setuptools_scm v1.17.0
- six 1.11.0
- pytest-runner 3.0
The packages/modules were just copied over.