Skip to content

Commit 04958ea

Browse files
authored
Support for PyCharm remote deployment (#4299)
w
1 parent 5200a18 commit 04958ea

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

doc/whats-new.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ Documentation
4545

4646
Internal Changes
4747
~~~~~~~~~~~~~~~~
48+
- Fix ``pip install .`` when no ``.git`` directory exists; namely when the xarray source
49+
directory has been rsync'ed by PyCharm Professional for a remote deployment over SSH.
50+
By `Guido Imperiale <https://github.com/crusaderky>`_
4851
- Only load resource files when running inside a Jupyter Notebook
4952
(:issue:`4294`) By `Guido Imperiale <https://github.com/crusaderky>`_
5053

setup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#!/usr/bin/env python
22
from setuptools import setup
33

4-
setup(use_scm_version=True)
4+
try:
5+
setup(use_scm_version=True)
6+
except LookupError as e:
7+
# .git has been removed, and this is not a package created by sdist
8+
# This is the case e.g. of a remote deployment with PyCharm Professional
9+
if not str(e).startswith("setuptools-scm was unable to detect version"):
10+
raise
11+
setup(version="999")

0 commit comments

Comments
 (0)