Skip to content
This repository was archived by the owner on Feb 24, 2024. It is now read-only.

Build failure: NameError: name 'file' is not defined #39

Open
minfrin opened this issue May 14, 2020 · 2 comments
Open

Build failure: NameError: name 'file' is not defined #39

minfrin opened this issue May 14, 2020 · 2 comments

Comments

@minfrin
Copy link

minfrin commented May 14, 2020

While trying the "pip install" step in the install instructions, the build fails as below.

Little-Net:ccs-caldavtester minfrin$ virtualenv venv
created virtual environment CPython3.7.7.final.0-64 in 460ms
  creator CPython3Posix(dest=/Users/minfrin/src/apache/sandbox/calendar/ccs-caldavtester/venv, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/Users/minfrin/Library/Application Support/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Little-Net:ccs-caldavtester minfrin$ source venv/bin/activate
(venv) Little-Net:ccs-caldavtester minfrin$ pip install -r requirements.txt
Obtaining file:///Users/minfrin/src/apache/sandbox/calendar/ccs-caldavtester (from -r requirements.txt (line 5))
    ERROR: Command errored out with exit status 1:
     command: /Users/minfrin/src/apache/sandbox/calendar/ccs-caldavtester/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/minfrin/src/apache/sandbox/calendar/ccs-caldavtester/setup.py'"'"'; __file__='"'"'/Users/minfrin/src/apache/sandbox/calendar/ccs-caldavtester/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
         cwd: /Users/minfrin/src/apache/sandbox/calendar/ccs-caldavtester/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/minfrin/src/apache/sandbox/calendar/ccs-caldavtester/setup.py", line 169, in <module>
        long_description = file(joinpath(dirname(__file__), "README.md")).read()
    NameError: name 'file' is not defined
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
@dreness
Copy link
Member

dreness commented May 14, 2020

Hi @minfrin - Unfortunately CalDAVTester requires python 2.7, which is end of life. I can’t say I recommend using python 2 at this point, however it should still work. One silver lining I guess is that because CalDAV tester is a purely over-the-wire test suite, it is totally isolated from whatever server it is testing against.

This project has historically been maintained alongside CalendarServer, which was “archived” some months ago. CalDAVTester may have broader use than CalendarServer did, as it is (as far as I know) the most complete CalDAV conformance test suite. All the same, we would likely rely on community contributions to get this project python3 clean.

@claudep
Copy link

claudep commented Aug 14, 2021

A first step towards Python 3 compatibility is proposed in PR #40.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants