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

Commit

Permalink
Fixed setup.py requirements bug.
Browse files Browse the repository at this point in the history
Need to include requirements.txt otherwise when setup.py is run on
end-user's machines, no requirements are specified.
  • Loading branch information
Robpol86 committed Apr 5, 2015
1 parent 2e17091 commit a0acf1e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include requirements.txt
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ When specifying settings in ``tox.ini`` under the ``[flake8]`` section, use ``sh

This project adheres to `Semantic Versioning <http://semver.org/>`_.

`1.0.2 - 2015-04-04`_
---------------------

* Fixed setup.py requirements bug.

`1.0.0 - 2015-04-04`_
---------------------

Expand Down
2 changes: 1 addition & 1 deletion flake8_pep257.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

__author__ = '@Robpol86'
__license__ = 'MIT'
__version__ = '1.0.0'
__version__ = '1.0.2'


def load_file(filename):
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sys
from distutils.spawn import find_executable

import setuptools.command.sdist
import setuptools
from setuptools.command.test import test

_PACKAGES = lambda: [os.path.join(r, s) for r, d, _ in os.walk(NAME_FILE) for s in d if s != '__pycache__']
Expand Down Expand Up @@ -46,7 +46,7 @@ def _requires(path):
if not os.path.exists(os.path.join(HERE, path)):
return list()
file_handle = codecs.open(os.path.join(HERE, path), encoding='utf-8')
requirements = [i for i in file_handle if i[0] != '-']
requirements = [i.strip() for i in file_handle if i[0] != '-']
file_handle.close()
return requirements

Expand Down Expand Up @@ -126,6 +126,7 @@ def run_tests(self):
# noinspection PyTypeChecker
ALL_DATA.update(dict(_VERSION_RE.findall(_safe_read(VERSION_FILE, 1500).replace('\r\n', '\n'))))
ALL_DATA.update(dict(py_modules=[NAME_FILE]) if not PACKAGE else dict(packages=[NAME_FILE] + _PACKAGES()))
ALL_DATA['requires'] = ALL_DATA['install_requires']


if __name__ == '__main__':
Expand Down

0 comments on commit a0acf1e

Please sign in to comment.