Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
[tests] Fixing setup.py reqs not found issue and travis import error
Browse files Browse the repository at this point in the history
  • Loading branch information
tasdikrahman committed May 14, 2017
1 parent d074190 commit b683e5f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -30,3 +30,8 @@ Changelog
- API changes to importing the module
```from vocabulary.vocabulary import Vocabulary as vb``` instead of ```from vocabulary import Vocabulary as vb```

1.0.4
~~~~~

- Fixed `setup.py` requirements.txt file not found issue by removing the logic to strip dependencies. Just a hack for now. Need to do it the older way.
- Fixed failing tests in travis due to older unchanged import of `vocabulary`
27 changes: 15 additions & 12 deletions setup.py
Expand Up @@ -12,18 +12,18 @@
from vocabulary.version import VERSION
__version__ = VERSION

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

# get the dependencies and installs
if sys.version_info[:2] <= (2, 7):
with open(path.join(here, 'requirements.txt')) as f:
all_reqs = f.read().split('\n')
else:
with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f:
all_reqs = f.read().split('\n')
# # get the dependencies and installs
# if sys.version_info[:2] <= (2, 7):
# with open(path.join(here, 'requirements.txt')) as f:
# all_reqs = f.read().split('\n')
# else:
# with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f:
# all_reqs = f.read().split('\n')

install_requires = [x.strip() for x in all_reqs if 'git+' not in x]
dependency_links = [x.strip().replace('git+', '') for x in all_reqs if 'git+' not in x]
# install_requires = [x.strip() for x in all_reqs if 'git+' not in x]
# dependency_links = [x.strip().replace('git+', '') for x in all_reqs if 'git+' not in x]

try:
if sys.version_info[:2] <= (2, 7):
Expand All @@ -43,8 +43,11 @@
long_description=long_description,
url='https://github.com/prodicus/vocabulary',
license='MIT',
install_requires=install_requires,
dependency_links=dependency_links,
install_requires=[
"requests==2.13.0",
"mock==2.0.0"
],
#dependency_links=dependency_links,
# adding package data to it
packages=find_packages(exclude=['contrib', 'docs']),
download_url='https://github.com/prodicus/vocabulary/tarball/' + __version__,
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from vocabulary import Vocabulary as vb
from vocabulary.vocabulary import Vocabulary as vb
from vocabulary.responselib import Response as rp
import unittest
import sys
Expand Down
4 changes: 2 additions & 2 deletions vocabulary/version.py
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-

VERSION = '1.0.3'
RELEASE = '9'
VERSION = '1.0.4'
RELEASE = '10'

0 comments on commit b683e5f

Please sign in to comment.