Permalink
Browse files

Modify config to expect the new project layout

  • Loading branch information...
1 parent 38ea63a commit aedba08847222aa76c30244d5d2be3ae99786b8f @edschofield edschofield committed Sep 30, 2014
Showing with 33 additions and 23 deletions.
  1. +6 −5 MANIFEST.in
  2. +7 −3 discover_tests.py
  3. +5 −3 {src → }/futurize.py
  4. +3 −0 {src → }/pasteurize.py
  5. +12 −12 setup.py
  6. 0 {src/future/tests/disabled → tests/future}/__init__.py
  7. 0 tests/future/disabled/__init__.py
  8. 0 {src/future/tests → tests/future}/disabled/disabled_test_http_cookies.py
  9. 0 {src/future/tests → tests/future}/disabled/disabled_test_httpservers.py
  10. 0 {src/future/tests → tests/future}/disabled/disabled_test_urllib2_localnet.py
  11. 0 {src/future/tests → tests/future}/disabled/disabled_test_urllib2net.py
  12. 0 {src/future/tests → tests/future}/disabled/disabled_test_xmlrpc.py
  13. 0 {src/future/tests → tests/future}/disabled/disabled_test_xmlrpc_net.py
  14. 0 {src/future/tests → tests/future}/disabled/test_email/__init__.py
  15. 0 {src/future/tests → tests/future}/disabled/test_email/__main__.py
  16. BIN {src/future/tests → tests/future}/disabled/test_email/data/PyBanner048.gif
  17. BIN {src/future/tests → tests/future}/disabled/test_email/data/audiotest.au
  18. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_01.txt
  19. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_02.txt
  20. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_03.txt
  21. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_04.txt
  22. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_05.txt
  23. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_06.txt
  24. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_07.txt
  25. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_08.txt
  26. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_09.txt
  27. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_10.txt
  28. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_11.txt
  29. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_12.txt
  30. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_12a.txt
  31. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_13.txt
  32. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_14.txt
  33. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_15.txt
  34. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_16.txt
  35. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_17.txt
  36. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_18.txt
  37. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_19.txt
  38. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_20.txt
  39. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_21.txt
  40. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_22.txt
  41. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_23.txt
  42. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_24.txt
  43. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_25.txt
  44. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_26.txt
  45. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_27.txt
  46. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_28.txt
  47. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_29.txt
  48. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_30.txt
  49. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_31.txt
  50. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_32.txt
  51. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_33.txt
  52. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_34.txt
  53. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_35.txt
  54. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_36.txt
  55. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_37.txt
  56. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_38.txt
  57. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_39.txt
  58. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_40.txt
  59. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_41.txt
  60. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_42.txt
  61. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_43.txt
  62. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_44.txt
  63. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_45.txt
  64. 0 {src/future/tests → tests/future}/disabled/test_email/data/msg_46.txt
  65. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test__encoded_words.py
  66. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test__header_value_parser.py
  67. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test_asian_codecs.py
  68. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test_defect_handling.py
  69. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test_email.py
  70. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test_generator.py
  71. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test_headerregistry.py
  72. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test_inversion.py
  73. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test_message.py
  74. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test_parser.py
  75. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test_pickleable.py
  76. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test_policy.py
  77. 0 {src/future/tests → tests/future}/disabled/test_email/disabled_test_utils.py
  78. 0 {src/future/tests → tests/future}/test_buffer.py
  79. 0 {src/future/tests → tests/future}/test_builtins.py
  80. 0 {src/future/tests → tests/future}/test_builtins_explicit_import.py
  81. 0 {src/future/tests → tests/future}/test_bytes.py
  82. 0 {src/future/tests → tests/future}/test_common_iterators.py
  83. 0 {src/future/tests → tests/future}/test_decorators.py
  84. 0 {src/future/tests → tests/future}/test_dict.py
  85. 0 {src/future/tests → tests/future}/test_explicit_imports.py
  86. 0 {src/future/tests → tests/future}/test_futurize.py
  87. 0 {src/future/tests → tests/future}/test_html.py
  88. 0 {src/future/tests → tests/future}/test_htmlparser.py
  89. 0 {src/future/tests → tests/future}/test_http_cookiejar.py
  90. 0 {src/future/tests → tests/future}/test_httplib.py
  91. 0 {src/future/tests → tests/future}/test_import_star.py
  92. 0 {src/future/tests → tests/future}/test_imports_urllib.py
  93. 0 {src/future/tests → tests/future}/test_int.py
  94. 0 {src/future/tests → tests/future}/test_int_old_division.py
  95. 0 {src/future/tests → tests/future}/test_isinstance.py
  96. 0 {src/future/tests → tests/future}/test_libfuturize_fixers.py
  97. 0 {src/future/tests → tests/future}/test_list.py
  98. 0 {src/future/tests → tests/future}/test_magicsuper.py
  99. 0 {src/future/tests → tests/future}/test_object.py
  100. 0 {src/future/tests → tests/future}/test_pasteurize.py
  101. 0 {src/future/tests → tests/future}/test_py2_str_literals_to_bytes.py
  102. 0 {src/future/tests → tests/future}/test_requests.py
  103. 0 {src/future/tests → tests/future}/test_standard_library.py
  104. 0 {src/future/tests → tests/future}/test_str.py
  105. 0 {src/future/tests → tests/future}/test_super.py
  106. 0 {src/future/tests → tests/future}/test_surrogateescape.py
  107. 0 {src/future/tests → tests/future}/test_urllib.py
  108. 0 {src/future/tests → tests/future}/test_urllib2.py
  109. 0 {src/future/tests → tests/future}/test_urllib_response.py
  110. 0 {src/future/tests → tests/future}/test_urllibnet.py
  111. 0 {src/future/tests → tests/future}/test_urlparse.py
  112. 0 {src/future/tests → tests/future}/test_utils.py
  113. 0 tests/past/__init__.py
  114. 0 {src/past/tests → tests/past}/test_basestring.py
  115. 0 {src/past/tests → tests/past}/test_builtins.py
  116. 0 {src/past/tests → tests/past}/test_noniterators.py
  117. 0 {src/past/tests → tests/past}/test_olddict.py
  118. 0 {src/past/tests → tests/past}/test_oldstr.py
  119. 0 {src/past/tests → tests/past}/test_translation.py
View
@@ -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
View
@@ -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):
@@ -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
@@ -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.
View
@@ -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':
@@ -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",
@@ -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"
No 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.
No changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit aedba08

Please sign in to comment.