mozilla / http-observatory

Mozilla HTTP Observatory
https://observatory.mozilla.org/
Mozilla Public License 2.0
1.85k stars 168 forks source link

Can't run it on ARM Mac #475

Open twocs opened 2 years ago

twocs commented 2 years ago

Can't get it to work on M1 Mac. The pip3 dependencies fail. Apparently this project only works on x86-64.

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for psycopg2

donbowman commented 2 years ago

Seems dependabot doesn't visit setup.py, which has hard-pinned version

diff --git a/setup.py b/setup.py
index a605959..556ab96 100644
--- a/setup.py
+++ b/setup.py
@@ -40,7 +40,7 @@ setup(
         'beautifulsoup4==4.6.3',
         'billiard==3.5.0.4',
         'celery==4.2.1',
-        'click==7.0',
+        'click',
         'coverage==4.5.2',
         'flake8==3.6.0',
         'httpobs-cli==1.0.2',
@@ -55,13 +55,13 @@ setup(
         'pytz==2018.7',
         'vine==1.1.4',
         'Werkzeug==0.14.1',
-        'psycopg2>=2.7,<2.8',
+        'psycopg2>=2.7,<3',
         'redis==2.10.6',
         'psutil==5.9.0',
         'publicsuffixlist==0.7.12',
         'requests==2.27.1',
         'Flask==1.0.2',
-        'uWSGI==2.0.17.1'
+        'uWSGI==2.0.20'
     ],
     scripts=['httpobs/scripts/httpobs-local-scan',
              'httpobs/scripts/httpobs-mass-scan',

will make it build i think.

foundersec commented 1 year ago

After a while trying to get these to build properly I went with the nuclear option: Remove all versions from all Py modules in setup.py and the requirements.txt files within httpobs/database, scanner, and website and let Pip figure out dependencies. After doing so and starting over I was able to successfully build and run on an Ubuntu 22.04 VM running on an ARM Mac. I have not tried natively running on Mac, however this got it done.