Skip to content

Instantly share code, notes, and snippets.

@kujyp
Created June 8, 2019 15:42
Show Gist options
  • Save kujyp/6b811d755d4cb05ad80d6006447d3dcb to your computer and use it in GitHub Desktop.
Save kujyp/6b811d755d4cb05ad80d6006447d3dcb to your computer and use it in GitHub Desktop.
setup.py checking prerequisite example
import os
from setuptools import setup, find_packages
from mtml.about import __version__, __description__
try:
import CPLEX
except ImportError as e:
raise EnvironmentError("""You must install CPLEX manually first.
https://www.google.com/aclk?sa=l&ai=DChcSEwiW64S6nNriAhUStpYKHWwyCUAYABAAGgJ0bA&sig=AOD64_3Omi880wx8P-AGPbCVFVAHi2GIcg&q=&ved=2ahUKEwi-qf25nNriAhWIw4sBHaJPCtMQ0Qx6BAgXEAE&adurl=
""")
def requirements():
reqfile = 'requirements.txt'
with open(os.path.join(os.path.dirname(__file__), reqfile)) as f:
return f.read().splitlines()
setup(name='mtml',
version=__version__,
description=__description__,
packages=find_packages(exclude=[]),
entry_points='''
[console_scripts]
mtml = mtml.cli:main
''',
include_package_data=True,
install_requires=requirements())
@kujyp
Copy link
Author

kujyp commented Jun 8, 2019

# setup.py 있는 폴더로 가서 아래 명령어 실행하면, 설치 과정 볼수있음.
pip install .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment