Title: Issues with dateutil and pytz by mdboom · Pull Request #983 · matplotlib/matplotlib · GitHub
Open Graph Title: Issues with dateutil and pytz by mdboom · Pull Request #983 · matplotlib/matplotlib
X Title: Issues with dateutil and pytz by mdboom · Pull Request #983 · matplotlib/matplotlib
Description: pytz is outdated. The latest version is 2012c http://pypi.python.org/pypi/pytz/2012c pytz 2012c is compatible with Python 3 and should not be converted with the 2to3 tool. dateutil 1.5 is for Python 2.x only. Dateutil 2.1 is for Python 3.x only. See http://labix.org/python-dateutil/. dateutil 2.1 should should not be converted with the 2to3 tool. How about the following fix (works for me on win-amd64-py3.2)? update pytz to version 2012c include dateutil 2.1 under lib/dateutil2 add lib/six.py fix setup.py to use lib/dateutil2 instead of lib/dateutil on Python 3 and exclude pytz, dateutil2, and six.py from 2to3. diff --git a/setup.py b/setup.py index 6c59b4c..2fc64ff 100644 --- a/setup.py +++ b/setup.py @@ -106,6 +106,7 @@ package_data = {'matplotlib':['mpl-data/fonts/afm/*.afm', 'mpl-data/*.glade', 'backends/Matplotlib.nib/*', ]} +package_dir = {'': 'lib'} if 0: # TODO: exclude these when making release? @@ -214,6 +215,8 @@ if hasdatetime: # dates require python23 datetime packages.append('dateutil') packages.append('dateutil.zoneinfo') package_data['dateutil'] = ['zoneinfo/zoneinfo*.tar.*'] + if sys.version_info[0] >= 3: + py_modules.append('six') + package_dir['dateutil'] = 'lib/dateutil2' if sys.platform=='win32': # always add these to the win32 installer @@ -275,7 +278,9 @@ if sys.version_info[0] >= 3: def run_2to3(self, files): # We need to skip certain files that have already been # converted to Python 3.x - filtered = [x for x in files if 'py3' not in x] + filtered = [x for x in files if ('py3' not in x and + 'dateutil' not in x and + 'pytz' not in x and + 'six.py' not in x)] if sys.platform.startswith('win'): # doing this in parallel on windows may crash your computer [refactor(f) for f in filtered] @@ -305,7 +310,7 @@ distrib = setup(name="matplotlib", platforms='any', py_modules = py_modules, ext_modules = ext_modules, - package_dir = {'': 'lib'}, + package_dir = package_dir, package_data = package_data, cmdclass = {'build_py': build_py}, **additional_params
Open Graph Description: pytz is outdated. The latest version is 2012c http://pypi.python.org/pypi/pytz/2012c pytz 2012c is compatible with Python 3 and should not be converted with the 2to3 tool. dateutil 1.5 is for Pytho...
X Description: pytz is outdated. The latest version is 2012c http://pypi.python.org/pypi/pytz/2012c pytz 2012c is compatible with Python 3 and should not be converted with the 2to3 tool. dateutil 1.5 is for Pytho...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/983
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:cac0d212-83df-eed7-3cad-f4e374778a1f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C214:1A6FEB:1A31957:23E2914:6A53FA25 |
| html-safe-nonce | 102a4a11658003317ec856da54b05f0004928e8ad0ab0a310c372a7e2372b8e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjE0OjFBNkZFQjoxQTMxOTU3OjIzRTI5MTQ6NkE1M0ZBMjUiLCJ2aXNpdG9yX2lkIjoiNzkxOTY4NjU4NjI1Nzg5ODAyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ba124654ffb562ce1bb14ca0db7943ca2b9a62467489b0911877bab878ca7b58 |
| hovercard-subject-tag | pull_request:2126348 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/983/files |
| twitter:image | https://avatars.githubusercontent.com/u/38294?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/38294?s=400&v=4 |
| og:image:alt | pytz is outdated. The latest version is 2012c http://pypi.python.org/pypi/pytz/2012c pytz 2012c is compatible with Python 3 and should not be converted with the 2to3 tool. dateutil 1.5 is for Pytho... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width