Skip to content

Commit

Permalink
splat requirements to regular and test. setup reading regular. added …
Browse files Browse the repository at this point in the history
…more dynamically calculating.
  • Loading branch information
tomerghelber committed Oct 3, 2014
1 parent 041ef37 commit 18fcbde
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ python:
# command to install dependencies
install:
- "pip install -r requirements.txt"
- "pip install -r test_requirements.txt"
# command to run tests
script: nosetests --with-coverage --cover-package=pymal
after_success:
Expand Down
4 changes: 1 addition & 3 deletions pymal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
__authors__ = ""
__copyright__ = "(c) 2014, pymal"
__authors__ = "pymal-developers"
__license__ = "BSD License"
__contact__ = "Name Of Current Guardian of this file <email@address>"

__all__ = ['account', 'anime', 'manga', 'seasons']

Expand Down
8 changes: 2 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
# This is an implicit value, here for clarity
--index-url https://pypi.python.org/simple/

# Those are like in setup.py
# Those are required for running
beautifulsoup4>=4.3.2
html5lib>=0.999
httpcache>=0.1.3
six==1.3
requests>=2.4.1
pillow>=2.5.3
pillow>=2.6.0
singleton3>=1.0
singleton-factory>=0.1
reloaded-set>=0.3

# This is needed for tests
coveralls>=0.4.2
mock==1.0.1
26 changes: 13 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
from setuptools import setup, find_packages
from pip.req import parse_requirements


# Dynamically calculate the version based on pymal.__version__.
version = __import__('pymal').__version__

# Dynamically calculate the license based on pymal.__license__.
license = __import__('pymal').__license__

# Dynamically calculate the authors based on pymal.__authors__.
authors = __import__('pymal').__authors__

requirements_path = 'requirements.txt'

setup(
name='pymal',
packages=find_packages(exclude=['tests*']),
version=version,
description='A python api for the website MyAnimeList (or MAL).',
author='pymal-developers',
license="BSD",
author=authors,
license=license,
url='https://bitbucket.org/pymal-developers/pymal/',
keywords=[
"MyAnimeList", "myanimelist",
Expand Down Expand Up @@ -48,15 +56,7 @@
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: User Interfaces',
],
install_requires=[
'requests>=2.4.1',
'beautifulsoup4>=4.3.2',
'httpcache>=0.1.3',
'html5lib>=0.999',
'six==1.3',
'pillow>=2.5.3',
'singleton3>=1.0',
'singleton-factory>=0.1',
'reloaded-set>=0.3',
],

# Dynamically calculate the install_requires based on requirements_path.
install_requires=[str(ir.req) for ir in parse_requirements(requirements_path)],
)
6 changes: 6 additions & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is an implicit value, here for clarity
--index-url https://pypi.python.org/simple/

# This is needed for tests
coveralls>=0.4.4
mock==1.0.1

0 comments on commit 18fcbde

Please sign in to comment.