mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-04-22 10:18:59 +02:00
Attempt readthedocs workaround
readthedocs alters docs/conf.py which in turn means python_scm detects a version and incorrectly adjusts the version number. Here we try to work around this problem. We do this by renaming the docs/conf.py file and copying it back to docs/conf.py when setup.py is invoked. This way, hopefully, scm won't see the changes to docs/conf.py References: http://stackoverflow.com/questions/35811267/readthedocs-and-setuptools-scm-version-wrong/36386177 https://github.com/pypa/setuptools_scm/issues/84
This commit is contained in:
parent
a8b288338b
commit
89c5b57019
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
sshuttle/version.py
|
sshuttle/version.py
|
||||||
|
docs/conf.py
|
||||||
*.pyc
|
*.pyc
|
||||||
*~
|
*~
|
||||||
*.8
|
*.8
|
||||||
|
5
setup.py
5
setup.py
@ -18,7 +18,12 @@
|
|||||||
# along with python-tldap If not, see <http://www.gnu.org/licenses/>.
|
# along with python-tldap If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
with open("./docs/conf.orig.py", "r") as src:
|
||||||
|
with open("./docs/conf.py", "w") as dst:
|
||||||
|
dst.write("# FILE COPIED FROM conf.orig.py; DO NOT CHANGE\n")
|
||||||
|
shutil.copyfileobj(src, dst)
|
||||||
|
|
||||||
def version_scheme(version):
|
def version_scheme(version):
|
||||||
from setuptools_scm.version import guess_next_dev_version
|
from setuptools_scm.version import guess_next_dev_version
|
||||||
|
Loading…
Reference in New Issue
Block a user