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

Installation issue with Python 3.6 #14

Open
mrBuG opened this issue Apr 18, 2018 · 4 comments
Open

Installation issue with Python 3.6 #14

mrBuG opened this issue Apr 18, 2018 · 4 comments

Comments

@mrBuG
Copy link

mrBuG commented Apr 18, 2018

There is an issue with installation the package against Python 3.6.4

Downloading https://files.pythonhosted.org/packages/88/21/fa58016bae1a0bbe693ed745d188ef3b01c75ad3b575c9b7cd540522da07/robotframework-pageobjectlibrary-0.1.7.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\avasilev\AppData\Local\Temp\pip-install-p80l_dxl\robotframework-pageobjectlibrary\setup.py", line 5, in

execfile('PageObjectLibrary/version.py')
NameError: name 'execfile' is not defined

@boakley
Copy link
Owner

boakley commented Apr 18, 2018 via email

@darrylwhiting
Copy link

darrylwhiting commented May 5, 2018

This worked for me (tested only on Python 3.6.4):

Comment out the following line in setup.py:

execfile('PageObjectLibrary/version.py')

and replace with the below.

exec(open('PageObjectLibrary/version.py').read())

if you need setup.py to be compatible with both 2.x and 3.x, add the following to setup.py (tested only on Python 3.6.4):

# N.B. to push a new version to PyPi, update the version number
# in rfhub/version.py and then run 'python setup.py sdist upload'
import sys
from setuptools import setup

if sys.version_info[0] > 2:
	exec(open('PageObjectLibrary/version.py').read())	
else:	
	execfile('PageObjectLibrary/version.py')

setup(
    name             = 'robotframework-pageobjectlibrary',
    version          = __version__,
    author           = 'Bryan Oakley',
    author_email     = '[email protected]',
    url              = 'https://github.com/boakley/robotframework-pageobjectlibrary/',
    keywords         = 'robotframework',
    license          = 'Apache License 2.0',
    description      = 'RobotFramework library that implements the Page Object pattern',
    long_description = open('README.md', encoding='latin-1').read(),
    zip_safe         = True,
    include_package_data = True,
    install_requires = ['robotframework', 'robotframework-selenium2library', 'selenium', 'six'],
    classifiers      = [
        "Development Status :: 4 - Beta",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: OS Independent",
        "Framework :: Robot Framework",
        "Programming Language :: Python",
        "Topic :: Software Development :: Testing",
        "Topic :: Software Development :: Quality Assurance",
        "Intended Audience :: Developers",
        ],
    packages         =[
        'PageObjectLibrary',
    ],
    scripts          =[], 
)

andrewordiales added a commit to andrewordiales/robotframework-pageobjectlibrary that referenced this issue Aug 1, 2018
@itsanjan
Copy link

Does not work for python 3.7.1
`Installing robotframework-pageobjectlibrary…
Collecting robotframework-pageobjectlibrary
Downloading https://files.pythonhosted.org/packages/88/21/fa58016bae1a0bbe693ed745d188ef3b01c75ad3b575c9b7cd540522da07/robotframework-pageobjectlibrary-0.1.7.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\kumanz\AppData\Local\Temp\pip-install-dcv_diio\robotframework-pageobjectlibrary\setup.py", line 5, in
execfile('PageObjectLibrary/version.py')
NameError: name 'execfile' is not defined

----------------------------------------

Error: An error occurred while installing robotframework-pageobjectlibrary!
Command "python setup.py egg_info" failed with error code 1 in C:\Users\kumanz\AppData\Local\Temp\pip-install-dcv_diio\robotframework-pageobjectlibrary`

@darrylwhiting
Copy link

@itsanjan, the corrected "setup.py" is in a fork by @andrewordiales. You can manually add the changes I suggested, or go to @andrewordiales Github page: Fork

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