|
1 | 1 | import sys |
2 | 2 | from subprocess import call |
| 3 | +from setuptools import setup, find_packages |
3 | 4 | from pathlib import Path |
4 | 5 |
|
| 6 | +# https://github.com/pypa/pip/issues/7498 |
| 7 | +try: |
| 8 | + from pip._internal.main import main |
| 9 | + if not callable(main): |
| 10 | + raise ImportError |
| 11 | + |
| 12 | +except ImportError: |
| 13 | + try: |
| 14 | + from pip._internal import main |
| 15 | + if not callable(main): |
| 16 | + raise ImportError |
| 17 | + |
| 18 | + except ImportError: |
| 19 | + from pip import main |
| 20 | + |
| 21 | + if not callable(main): |
| 22 | + raise ImportError |
| 23 | + |
5 | 24 | print("Installing binaries...") |
6 | | -call([sys.executable, str(Path(__file__).parent / "actual_setup.py")]) |
| 25 | + |
| 26 | +main(['install', 'purescripto >= 0.7.3']) |
| 27 | +main(['install', 'requests']) |
7 | 28 | call([sys.executable, str(Path(__file__).parent / "install_binary.py")]) |
| 29 | + |
| 30 | +version = 0.1 |
| 31 | +with Path('README.md').open() as readme: |
| 32 | + readme = readme.read() |
| 33 | + |
| 34 | +setup( |
| 35 | + name='pspy-proxy', |
| 36 | + version=version if isinstance(version, str) else str(version), |
| 37 | + keywords="", # keywords of your project that separated by comma "," |
| 38 | + description="", # a concise introduction of your project |
| 39 | + long_description=readme, |
| 40 | + long_description_content_type="text/markdown", |
| 41 | + license='mit', |
| 42 | + python_requires='>=3.5.0', |
| 43 | + url='https://github.com/purescript-python/installer', |
| 44 | + author='thautawarm', |
| 45 | + |
| 46 | + packages=find_packages(), |
| 47 | + entry_points={"console_scripts": ['pspy-blueprint=pspy_proxy.proxy:main']}, |
| 48 | + # above option specifies what commands to install, |
| 49 | + # e.g: entry_points={"console_scripts": ["yapypy=yapypy.cmd:compiler"]} |
| 50 | + install_requires=['purescripto>=0.7.3', 'requests'], # dependencies |
| 51 | + platforms="any", |
| 52 | + classifiers=[ |
| 53 | + "Programming Language :: Python :: 3.5", |
| 54 | + "Programming Language :: Python :: 3.6", |
| 55 | + "Programming Language :: Python :: 3.7", |
| 56 | + "Programming Language :: Python :: 3.8", |
| 57 | + "Programming Language :: Python :: 3.9", |
| 58 | + "Programming Language :: Python :: Implementation :: CPython", |
| 59 | + ], |
| 60 | + zip_safe=False, |
| 61 | +) |
0 commit comments