Skip to content

Commit

Permalink
Update setup.py and requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
jpadilla committed Dec 18, 2014
1 parent e813f7c commit 67760cb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 26 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
@@ -1,3 +1,2 @@
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
include requirements.txt
1 change: 0 additions & 1 deletion docs/index.md
Expand Up @@ -70,7 +70,6 @@ Install testing requirements.

```bash
$ pip install -r requirements.txt
$ pip install -r requirements-test.txt
```

Run with runtests.
Expand Down
6 changes: 0 additions & 6 deletions requirements-test.txt

This file was deleted.

16 changes: 15 additions & 1 deletion requirements.txt
@@ -1 +1,15 @@
PyYAML>=3.10
# Minimum Django and REST framework version
Django>=1.6
djangorestframework>=2.4.3

# Test requirements
pytest-django==2.6
pytest==2.5.2
pytest-cov==1.6
flake8==2.2.2

# wheel for PyPI installs
wheel==0.24.0

# MkDocs for documentation previews/deploys
mkdocs==0.11.1
23 changes: 6 additions & 17 deletions setup.py
Expand Up @@ -4,7 +4,6 @@
import os
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand


name = 'djangorestframework-yaml'
Expand All @@ -14,21 +13,9 @@
author = 'José Padilla'
author_email = 'hello@jpadilla.com'
license = 'BSD'
install_requires = open('requirements.txt').read().split('\n')


# This command has been borrowed from
# https://github.com/getsentry/sentry/blob/master/setup.py
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['tests']
self.test_suite = True

def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
install_requires = [
'PyYAML>=3.10',
]


def get_version(package):
Expand Down Expand Up @@ -69,6 +56,9 @@ def get_package_data(package):


if sys.argv[-1] == 'publish':
if os.system("pip freeze | grep wheel"):
print("wheel not installed.\nUse `pip install wheel`.\nExiting.")
sys.exit()
os.system("python setup.py sdist upload")
os.system("python setup.py bdist_wheel upload")
print("You probably want to also tag the version now:")
Expand All @@ -87,7 +77,6 @@ def get_package_data(package):
author_email=author_email,
packages=get_packages(package),
package_data=get_package_data(package),
cmdclass={'test': PyTest},
install_requires=install_requires,
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand Down

0 comments on commit 67760cb

Please sign in to comment.