Skip to content

Commit

Permalink
fix(doc): mention $CWD/setup.cfg is a possibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ankostis committed Jun 6, 2018
1 parent c76950d commit c0451ec
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Bugfixing `polyversion` (and generate a non-buggy standalone wheel):
...
You may bypass this check and create a package with non-engraved sources
(although it might not work correctly) by adding `skip_polyversion_check` option
in your ``setup.cfg`` file, like this::
in your ``$CWD/setup.cfg`` file, like this::

[global]
skip_polyversion_check = true
Expand Down
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,9 @@ Features
bdist-check
The :term:`setuptools plugin` aborts any `bdist...` commands if they
are not run from an :term:`r-tag` (unless ``skip_polyversion_check = true``
option exists in your project's ``setup.cfg:[global]`` section.
option exists in your project's ``$CWD/setup.cfg:[global]`` section.
Marking dependent versions across sub-projects
[TODO] When bumping the version of a sub-project the `"local" part of PEP-440
Expand Down
2 changes: 1 addition & 1 deletion pvlib/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ from PKG-INFO or git tags (see :func:`polyversion.init_plugin_kw`):
from a :term:`release tag`.
You may bypass this check and create a package with non-engraved sources
(although it might not work correctly) by adding `skip_polyversion_check` option
in your ``setup.cfg`` file, like this::
in your ``$CWD/setup.cfg`` file, like this::

[global]
skip_polyversion_check = true
Expand Down
8 changes: 4 additions & 4 deletions pvlib/polyversion/setuplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def _monkeypathed_run_command(dist, cmd):
from distutils.errors import DistutilsSetupError
raise DistutilsSetupError(
"Attempted to run '%s' from a non release-tag?\n error: %s"
"\n Add `skip_polyversion_check = true` in your `setup.cfg:[global]` section"
"\n Add `skip_polyversion_check = true` in your `$CWD/setup.cfg:[global]` section"
"\n if you really want to build a binary distribution package "
"\n from non-engraved sources." %
(cmd, rtag_err))
Expand All @@ -227,7 +227,7 @@ def skip_plugin_check_kw(dist, _attr, kw_value):
:term:`setuptools` commands will abort if not run from a :term:`release tag`.
You may bypass this check and create a package with non-engraved sources
(although it might not work correctly) by adding `skip_polyversion_check` option
in your ``setup.cfg`` file, like this::
in your ``$CWD/setup.cfg`` file, like this::
[global]
skip_polyversion_check = true
Expand All @@ -237,6 +237,6 @@ def skip_plugin_check_kw(dist, _attr, kw_value):
- Registered in `distutils.setup_keywords` *entry_point* of this project's
``setup.py`` file.
"""
## NOTE: this runs only if kw set in `setup.py:setup()`` - BUT
# NOT from `setup.cfg:[global]` section!!
## NOTE: code here runs only if kw set in `setup.py:setup()`` - BUT
# NOT from `$CWD/setup.cfg:[global]` section!!
dist.skip_polyversion_check = bool(kw_value)

0 comments on commit c0451ec

Please sign in to comment.