Skip to content

Commit

Permalink
fix setup.py, requirements-test.txt file not found, issue #33
Browse files Browse the repository at this point in the history
  • Loading branch information
lehinevych committed Oct 8, 2019
1 parent 025e5ac commit b65dfa3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mediawikiapi/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.4"
__version__ = "1.1.4.1"
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@


def local_file(file):
return codecs.open(
os.path.join(os.path.dirname(__file__), file), 'r', 'utf-8'
)
if os.path.exists(file):
f = codecs.open(os.path.join(os.path.dirname(__file__), file), 'r', 'utf-8')
return f.readlines()
return []


install_reqs = [
line.strip()
for line in local_file('requirements.txt').readlines()
for line in local_file('requirements.txt')
if line.strip() != ''
]

install_test_reqs = [
line.strip()
for line in local_file('requirements-test.txt').readlines()
for line in local_file('requirements-test.txt')
if line.strip() != ''
]

Expand All @@ -49,6 +50,7 @@ def local_file(file):
url = "https://github.com/lehinevych/MediaWikiAPI",
install_requires = install_reqs,
tests_require = install_test_reqs,
test_suite="tests",
packages = ['mediawikiapi'],
long_description = long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit b65dfa3

Please sign in to comment.