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

Rammbock install fails on python3 #68

Open
joelwhitehouse opened this issue Jul 14, 2017 · 3 comments
Open

Rammbock install fails on python3 #68

joelwhitehouse opened this issue Jul 14, 2017 · 3 comments

Comments

@joelwhitehouse
Copy link

joelwhitehouse commented Jul 14, 2017

Steps to Reproduce

On an ubuntu 16.04 LTS installation, open a console. First run sudo pip3 install robotframework.

Then run sudo pip3 install robotframework-rammbock.

Alternatively, download rammbock version 0.4.0.1 on pypi then run sudo python3 setup.py

Expect

robotframework-rambock should install without error.

Actual

The installation fails with the following outuput:

$ sudo pip3 install robotframework-rammbock                                                                                                                               
Collecting robotframework-rammbock
  Using cached robotframework-rammbock-0.4.0.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-5sjki94c/robotframework-rammbock/setup.py", line 6, in <module>
        execfile(join(CURDIR, 'src', 'Rammbock', 'version.py'))
    NameError: name 'execfile' is not defined

Recommended solution

Referring to this question on stack overflow, I was able to resolve this issue by replacing setup.py:6

execfile(join(CURDIR, 'src', 'Rammbock', 'version.py'))

with the following:

filename=join(CURDIR, 'src', 'Rammbock', 'version.py')
exec(compile(open(filename, "rb").read(), filename, 'exec'))

Testing

The discussion on stack overflow suggests that this change is compatible with both python2 and python3. I verified that for both python2 and python3 on my machine using the commands:

sudo python setup.py
sudo python3 setup.py

I'm happy to submit this change as a pull request.

@chbndrhnns
Copy link

Also stumbled on this one today and would be glad to see it resolved in the repo, as well.

@shivakumargn
Copy link

I hope this gets in soon.

MushuEE pushed a commit to MushuEE/Rammbock that referenced this issue Aug 23, 2018
@tapioreijonen
Copy link

I'm also waiting Python 3 support asap.

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

No branches or pull requests

4 participants