Skip to content

Commit

Permalink
setup.py for pip install -e . fix ccxt#443
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Nov 2, 2017
1 parent 1458cbe commit e78c660
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@
import json

here = path.abspath(path.dirname(__file__))
root = path.dirname(here)

readme_rst = path.join(here, 'README.rst')
package_json = path.join(here, 'package.json')

# a workaround when installing locally from git repository with pip install -e .
if not path.isfile(package_json):
package_json = path.join(root, 'package.json')

# long description from README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
with open(readme_rst, encoding='utf-8') as f:
long_description = f.read()

# version number and all other params from package.json
with open(path.join(here, 'package.json'), encoding='utf-8') as f:
with open(package_json, encoding='utf-8') as f:
package = json.load(f)

setup(
Expand Down

0 comments on commit e78c660

Please sign in to comment.