|
31 | 31 |
|
32 | 32 | from distutils import log
|
33 | 33 | from distutils.core import Command
|
34 |
| -from setuptools.command.install import install |
35 | 34 | from setuptools.command.develop import develop
|
| 35 | +from setuptools.command.install import install |
36 | 36 | from setuptools.command.sdist import sdist
|
37 | 37 | from setuptools import setup, find_packages
|
38 | 38 | from subprocess import check_output
|
@@ -158,7 +158,7 @@ def _get_package_version(self):
|
158 | 158 | """
|
159 | 159 | Attempt to get the most correct current version of Sentry.
|
160 | 160 | """
|
161 |
| - pkg_path = os.path.join(ROOT, 'src') |
| 161 | + pkg_path = os.path.join(self.work_path, 'src') |
162 | 162 |
|
163 | 163 | sys.path.insert(0, pkg_path)
|
164 | 164 | try:
|
@@ -237,9 +237,10 @@ def run(self):
|
237 | 237 | def _build_static(self):
|
238 | 238 | work_path = self.work_path
|
239 | 239 |
|
240 |
| - log.info("initializing git submodules") |
241 |
| - check_output(['git', 'submodule', 'init'], cwd=work_path) |
242 |
| - check_output(['git', 'submodule', 'update'], cwd=work_path) |
| 240 | + if os.path.exists(os.path.join(work_path, '.git')): |
| 241 | + log.info("initializing git submodules") |
| 242 | + check_output(['git', 'submodule', 'init'], cwd=work_path) |
| 243 | + check_output(['git', 'submodule', 'update'], cwd=work_path) |
243 | 244 |
|
244 | 245 | log.info("running [npm install --quiet]")
|
245 | 246 | check_output(['npm', 'install', '--quiet'], cwd=work_path)
|
@@ -284,7 +285,7 @@ def run(self):
|
284 | 285 |
|
285 | 286 | url='https://www.getsentry.com',
|
286 | 287 | description='A realtime logging and aggregation server.',
|
287 |
| - long_description=open('README.rst').read(), |
| 288 | + long_description=open(os.path.join(ROOT, 'README.rst')).read(), |
288 | 289 | package_dir={'': 'src'},
|
289 | 290 | packages=find_packages('src'),
|
290 | 291 | zip_safe=False,
|
|
0 commit comments