Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for distutils bug in python 2.7 #165

Merged
merged 1 commit into from Nov 12, 2019

Conversation

xeor
Copy link
Contributor

@xeor xeor commented Oct 5, 2018

There is a weird bug in python 2.7 that causes a NameError when trying to install this package using run_setup in distutils..
https://bugs.python.org/issue23426 seams related, but does not work in this case.

Here is the error it fixes..

In [1]: from distutils.core import run_setup

In [2]: run_setup('setup.py', ['bdist_egg'])
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-cd35a16b7b8c> in <module>()
----> 1 run_setup('setup.py', ['bdist_egg'])

/usr/local/lib/python2.7/distutils/core.pyc in run_setup(script_name, script_args, stop_after)
    216             f = open(script_name)
    217             try:
--> 218                 exec f.read() in g, l
    219             finally:
    220                 f.close()

/tmp/pip-temp-RZje_i/chardet/setup.py in <module>()

/tmp/pip-temp-RZje_i/chardet/setup.py in get_version()

NameError: global name 're' is not defined

@dan-blanchard dan-blanchard merged commit b411a97 into chardet:master Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants