Skip to content

Commit

Permalink
Remove checking imports from setup.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasily-v-ryabov committed Jul 1, 2015
1 parent 5eef82a commit 9577d53
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ def SetupPath(path = ""):
# add it to the system path
sys.path.append(SetupPath())

try:
import win32api
requirements = []
except ImportError:
requirements = ["pypiwin32"]

# make sure the documentation is in the correct place for building
# todo: see how to build the website
Expand Down Expand Up @@ -97,22 +102,5 @@ def SetupPath(path = ""):
'Topic :: Software Development :: Testing',
'Topic :: Software Development :: User Interfaces',
],
install_requires=["pypiwin32"],
install_requires=requirements,
)

# todo: see how to build the website later
#if "sdist" in sys.argv:
# if not os.path.exists(SetupPath("website")):
# shutil.move(SetupPath("documentation"), SetupPath("website"))

# final check
try:
import ctypes
import win32gui
import win32gui_struct
import win32api
import pywinauto
except ImportError as e:
print("The following module has to be installed before running pywinauto...")
print("\t" + str(e).replace("No module named ", ""))
raise Exception('installation failed: ' + str(e))

0 comments on commit 9577d53

Please sign in to comment.