Skip to content

Commit

Permalink
Modify config to expect the new project layout
Browse files Browse the repository at this point in the history
  • Loading branch information
edschofield committed Sep 30, 2014
1 parent 38ea63a commit aedba08
Show file tree
Hide file tree
Showing 119 changed files with 33 additions and 23 deletions.
11 changes: 6 additions & 5 deletions MANIFEST.in
Expand Up @@ -18,9 +18,10 @@ recursive-include docs *.sh
recursive-include docs *.tiff
recursive-include docs *.txt
recursive-include docs Makefile
recursive-include future *.au
recursive-include future *.gif
recursive-include future *.pem
recursive-include future *.py
recursive-include future *.txt
recursive-include src *.py
recursive-include src *.pem
recursive-include tests *.au
recursive-include tests *.gif
recursive-include tests *.py
recursive-include tests *.txt

10 changes: 7 additions & 3 deletions discover_tests.py
Expand Up @@ -8,17 +8,21 @@
import unittest

if not hasattr(unittest.defaultTestLoader, 'discover'):
import unittest2 as unittest
try:
import unittest2 as unittest
except ImportError:
raise ImportError('The unittest2 module is required to run tests on Python 2.6')

def additional_tests():
setup_file = sys.modules['__main__'].__file__
setup_dir = os.path.abspath(os.path.dirname(setup_file))
testsuite = unittest.defaultTestLoader.discover(setup_dir)
test_dir = os.path.join(setup_dir, 'tests')
test_suite = unittest.defaultTestLoader.discover(test_dir)
blacklist = []
if '/home/travis' in __file__:
# Skip some tests that fail on travis-ci
blacklist.append('test_command')
return exclude_tests(testsuite, blacklist)
return exclude_tests(test_suite, blacklist)


class SkipCase(unittest.TestCase):
Expand Down
8 changes: 5 additions & 3 deletions src/futurize.py → futurize.py
Expand Up @@ -3,10 +3,12 @@
futurize.py
===========
Like Armin Ronacher's ``modernize.py``, but using the ``future`` package rather than a direct dependency on ``six``'.
This script is only used by the unit tests. Another script called
"futurize" is created automatically (without the .py extension) by
setuptools.
futurize.py attempts to turn Py2 code into valid, clean Py3 code that is also
compatible with Py2 when using the ``future`` package.
futurize.py attempts to turn Py2 code into valid, clean Py3 code that is
also compatible with Py2 when using the ``future`` package.
Licensing
Expand Down
3 changes: 3 additions & 0 deletions src/pasteurize.py → pasteurize.py
Expand Up @@ -3,6 +3,9 @@
pasteurize.py
=============
This script is only used by the unit tests. Another script called "pasteurize"
is created automatically (without the .py extension) by setuptools.
pasteurize.py attempts to turn Py3 code into relatively clean Py3 code that is
also compatible with Py2 when using the ``future`` package.
Expand Down
24 changes: 12 additions & 12 deletions setup.py
@@ -1,18 +1,16 @@
#!/usr/bin/env python

from __future__ import absolute_import

import os
import os.path
import sys

import future
from future.standard_library import exclude_local_folder_imports


with exclude_local_folder_imports('configparser', 'reprlib'):
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
try:
from setuptools import setup
except ImportError:
from distutils.core import setup


if sys.argv[-1] == 'publish':
Expand Down Expand Up @@ -41,14 +39,14 @@
"future.moves.tkinter",
"future.moves.urllib",
"future.moves.xmlrpc",
"future.tests",
"future.tests", # for future.tests.base
# "future.tests.test_email",
"future.utils",
"past",
"past.builtins",
"past.types",
"past.utils",
"past.tests",
# "past.tests",
"past.translation",
"libfuturize",
"libfuturize.fixes",
Expand Down Expand Up @@ -84,16 +82,18 @@
'check_rst.sh',
'TESTING.txt',
],
'tests': ['*.py'],
}

REQUIRES = []
TEST_REQUIRES = []
if sys.version_info[:2] == (2, 6):
REQUIRES += ['importlib', 'argparse']
TEST_REQUIRES += ['unittest2']
VERSION = future.__version__
import src.future
VERSION = src.future.__version__
DESCRIPTION = "Clean single-source support for Python 3 and 2"
LONG_DESC = future.__doc__
LONG_DESC = src.future.__doc__
AUTHOR = "Ed Schofield"
AUTHOR_EMAIL = "ed@pythoncharmers.com"
URL="https://python-future.org"
Expand Down
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added tests/past/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit aedba08

Please sign in to comment.