artefactual-labs / fpr2par

Access Archivematica Format Policy Registry (FPR) data via a Preservation Action Registry (PAR) API
Apache License 2.0
2 stars 0 forks source link

Problem: requirements.txt is missing "setuptools" #80

Open peterVG opened 4 years ago

peterVG commented 4 years ago

My local copy of the master branch includes "setuptools 46.0.0" in requirements.txt (see below). However, this tool is not listed on the remote master branch in GH. When I pip freeze > requirements.txt and then check git status, no diffs are detected and GIt outputs "Your branch is up to date with 'origin/master'."

I only raise this as an issue because deploying to the dev server tonight with a git pull origin master led to problems restarting the server. Firstly there were errors when I ran pip install -r requirements.txt. Then the server appeared to have restarted but wasn't responding to requests. After I manually ran pip install slugify it was working again and the server restart was successful. So something appears to to be amiss with requirements.txt?

Local requirements.txt:

Package            Version
------------------ -------
attrs              19.3.0 
click              7.1.1  
Flask              1.1.2  
Flask-BasicAuth    0.2.0  
Flask-SQLAlchemy   2.4.1  
importlib-metadata 1.6.0  
itsdangerous       1.1.0  
Jinja2             2.11.2 
jsonschema         3.2.0  
MarkupSafe         1.1.1  
more-itertools     8.2.0  
packaging          20.3   
pip                20.0.2 
pluggy             0.13.1 
py                 1.8.1  
pyparsing          2.4.7  
pyrsistent         0.16.0 
pytest             5.4.1  
python-slugify     4.0.0  
setuptools         46.0.0 
six                1.14.0 
SQLAlchemy         1.3.16 
text-unidecode     1.3    
wcwidth            0.1.9  
Werkzeug           1.0.1  
wheel              0.34.2 
zipp               3.1.0  
mjaddis commented 4 years ago

I also had the issue with needing to manually install slugify. Is this a python version issue? I'm been using python2.7 on ubuntu 18.04. In my case I also had to remove the version numbers in requirements.txt that pin more-itertools and pytest so that older versions got installed.

ross-spencer commented 4 years ago

@mjaddis @peterVG I have been working on the premise this is Python 3 only so the workaround you are doing Matthew makes sense when you run in Python 2. Quite a testament it still works! We're not using any of the from futures imports, but yep.

Once you're in a Python 3 venv you'll need to be careful with local binaries too, so I'm running:

python -m pip install -U -r requriements.txt

And similarly for the tests, I have to not use the user space pytest but python -m pytest.

If there is a brief window today I can take a look at the server on the parcore sub-domain. I'm not seeing the same problem when I delete and reinitialize my venv locally. That doesn't mean I'm not working around something though. I think I'll just need to see it live.