File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ To use setuptools_scm just modify your project's setup.py file like this:
18181. Add :code: `'setuptools_scm' ` to the :code: `setup_requires ` parameter
19192. Add the :code: `use_scm_version ` parameter and set it to ``True ``
2020
21-
2221 E.g.:
2322
2423 .. code :: python
@@ -31,6 +30,20 @@ To use setuptools_scm just modify your project's setup.py file like this:
3130 ... ,
3231 )
3332
33+ Arguments to ``get_version() `` (see below) may be passed as a
34+ dictionary to ``use_scm_version ``. For example:
35+
36+ .. code :: python
37+
38+ from setuptools import setup
39+ setup(
40+ ... ,
41+ use_scm_version = {" root" : " .." , " relative_to" : __file__ },
42+ setup_requires = [' setuptools_scm' ],
43+ ... ,
44+ )
45+
46+
3447 3. Access the version number in your package via :code: `pkg_resources `
3548
3649 E.g. (`PEP-0396 <https://www.python.org/dev/peps/pep-0396 >`_):
@@ -48,14 +61,16 @@ To use setuptools_scm just modify your project's setup.py file like this:
4861 Programmatic usage
4962------------------
5063
51- In order to use setuptools_scm from code
52- that one directory deeper than the project's root, you can use:
64+ In order to use `` setuptools_scm `` from code that one directory deeper
65+ than the project's root, you can use:
5366
5467.. code :: python
5568
5669 from setuptools_scm import get_version
5770 version = get_version(root = ' ..' , relative_to = __file__ )
5871
72+ See `setup.py Usage `_ above for how to use this within setup.py.
73+
5974
6075Usage from sphinx
6176-----------------
You can’t perform that action at this time.
0 commit comments