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

Fix/install requirements #1

Merged
merged 45 commits into from
May 4, 2013

Conversation

isislovecruft
Copy link
Contributor

These commits fix a broken requirements.txt file (it produced the following reproduceable error):

(oonib)~/code/ooni-backend $ pip install -r requirements.txt   
Exception:
Traceback (most recent call last):
  File "/home/isis/.virtualenvs/oonib/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/home/isis/.virtualenvs/oonib/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/commands/install.py", line 240, in run
    for req in parse_requirements(filename, finder=finder, options=options):
  File "/home/isis/.virtualenvs/oonib/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1356, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from)
  File "/home/isis/.virtualenvs/oonib/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 118, in from_line
    return cls(req, comes_from, url=url)
  File "/home/isis/.virtualenvs/oonib/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 43, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/home/isis/.virtualenvs/oonib/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2515, in parse
    raise ValueError("No requirements found", s)
ValueError: ('No requirements found', '')

Storing complete log in /home/isis/.pip/pip.log

The above error was due to requirements.txt containing the lines:

# Mirrored on Tor's webserver:
https://people.torproject.org/~ioerror/src/mirrors/ooniprobe/scapy-02-25-2013-tip.zip#egg=

The #egg= at the end should be #egg=scapy instead.

I have also updated README.md with a set of commands for getting ooni-backend installed on a system, including updating pip to a version (>=1.3.0) which includes the recent patches to force HTTPS for packages downloads and refuse installation if there is a hashsum mismatch. The commands also include installation and setup of virtualenv and virtualenvwrapper, creation of a virtualenv for ooni-backend, and lastly, the installation of ooni-backend without sudo inside the virtualenv.

storm>=0.19
transaction>=1.3.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

transaction, txtorcon, and probably the zope.* packages are required by oonib

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I added transaction back in. It doesn't seem to be imported or used anywhere though -- is there something strange going on with that package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And you're correct, we need zope.component: https://travis-ci.org/isislovecruft/ooni-backend/jobs/6485396

I've added the three zope modules back into requirements.txt.

 * travis-lint reports:
   (oonib)∃!isisⒶwintermute:~/code/torproject/ooni-backend ∴ travis-lint
   Hooray, /home/isis/code/torproject/ooni-backend/.travis.yml seems to be solid!
   (oonib)∃!isisⒶwintermute:~/code/torproject/ooni-backend ∴ date
   Fri Apr 19 23:06:31 UTC 2013
 * Change pip's package index command to be in the requirements.txt file.
@isislovecruft
Copy link
Contributor Author

We're not going to be able to support Python3.x for this without a bit of work, I think: https://travis-ci.org/isislovecruft/ooni-backend/jobs/6485395

( cyclone dependency has old except Exception, e: syntax)

@isislovecruft
Copy link
Contributor Author

Where is oonib.conf? It's hardcoded, and doesn't exist in the repo.

@isislovecruft
Copy link
Contributor Author

@aagbsn
Copy link
Contributor

aagbsn commented Apr 20, 2013

 * (oonib)∃!isisⒶwintermute:~/code/torproject/ooni-backend ∴ date
    Sun Apr 21 03:18:17 UTC 2013
    (oonib)∃!isisⒶwintermute:~/code/torproject/ooni-backend ∴ travis-lint
    Hooray, /home/isis/code/torproject/ooni-backend/.travis.yml seems to be solid!
…nts.travis".

 * (oonib)∃!isisⒶwintermute:~/code/torproject/ooni-backend ∴ date
   Sun Apr 21 03:29:49 UTC 2013
   (oonib)∃!isisⒶwintermute:~/code/torproject/ooni-backend ∴ travis-lint
   Hooray, /home/isis/code/torproject/ooni-backend/.travis.yml seems to be solid!
 * Fixed bugs due to several log functions attempting to use
   "config.advanced.debug" and "config.basic.logfile". These are both located
   under the config.main section.
 * Add LICENSE header and encoding specification to log.py. (Yes, we need
   these.)
 * Add log.warn() function back in.
 * txtorcon will handle finding the tor binary for us.
 * ∃!isisⒶwintermute:~/code/torproject/ooni-backend ∴ date
   Sun Apr 21 07:25:24 UTC 2013
   ∃!isisⒶwintermute:~/code/torproject/ooni-backend ∴ travis-lint
   Hooray, /home/isis/code/torproject/ooni-backend/.travis.yml seems to be solid!
 * travis-lint checks out okay:
(oonib)∃!isisⒶwintermute:~/code/torproject/ooni-backend ∴ date
Sun Apr 21 07:55:19 UTC 2013
(oonib)∃!isisⒶwintermute:~/code/torproject/ooni-backend ∴ travis-lint
Hooray, /home/isis/code/torproject/ooni-backend/.travis.yml seems to be solid!
@isislovecruft
Copy link
Contributor Author

Awww yeah. Best commit message evar. :D

chhhhshssshsh
Roger, this is Houston. All lights go, you're good for take off. Out.
chhhshshssshhh

@isislovecruft
Copy link
Contributor Author

bump. this is ready for merge.

could someone please pretty please with cherries on top review it?

@@ -0,0 +1,25 @@
## we do not want to override the PI URI for TravisCI:
#-i https://pypi.python.org/packages
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines which are commented out are because I discovered that pip-1.3.0 does not actually use SSL all of the time like it claims it does. What it does do is go to https://pypi.python.org/simple/ and select the package name, and then crawl all the links from the package's page, HTTPS or otherwise. So, for PyYAML, it would do go to https://pypi.python.org/simple/PyYAML/ where it sees:

PyYAML-3.10.win32-py3.0.exe
PyYAML-3.10.tar.gz
PyYAML-3.10.zip
3.08 home_page
3.08 download_url
3.09 home_page
3.09 download_url
3.05 home_page
3.05 download_url
3.06 home_page
3.06 download_url
3.04 home_page
3.04 download_url
3.03 home_page
3.03 download_url
3.01 home_page

Instead, if we force pip to use https://pypi.python.org/packages/source/ as its package index, it will use SSL, all the time. However, we cannot simply use pip's options pip --no-index --index-url https://pypi.python.org/packages/source to do this, because then it tries to get everything from there, making it break on Windows and making it break when the packages source is elsewhere (like on the homepage of whatever project). Not to mention that specifying urls like this is subject to change without notice, and so we would have to deal with this shit breaking nonstop.

Therefore, these links are commented out. They might be useful, and they took me a while to find and confirm that they work, so I left them in. But we should just use pip-1.3.0 the normal way, and wait patiently while they slowly upgrade all their links to use SSL, which it appears they are doing.

https://pypi.python.org/packages/2.7/T/Twisted/

@hellais hellais merged commit 75c95e5 into ooni:master May 4, 2013
@hellais
Copy link
Member

hellais commented May 4, 2013

Thanks for this. Merged!

ivilata pushed a commit to equalitie/ooni-backend that referenced this pull request Jul 13, 2017
peer locator: save reported peers to file
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