-
Notifications
You must be signed in to change notification settings - Fork 577
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
Updated build instructions? (M1, Xcode 13.2.1, Dec 2021) #3043
Comments
Hey @luckman212 , sorry this has been such a miserable experience. I would like our git repo to build directly from a fresh clone on a machine that has never built Hammerspoon before, and there are some options we could explore:
I'm curious why you got an error about a missing venv - I explicitly didn't use a venv for any of the dev/testing of the new build scripts, and the system Python3/pip3 are used explicitly to reduce the fragility of building in GitHub CI vs building on my machine. I'll for sure extend the For the main problem here though, generating I realise this isn't a quick answer that gets you building (I'm away from my machine so can't easily experiment and get you going), but I figured it was worth giving some context and thinking out-loud about how we could simplify life for everyone by reducing our dependence on external tooling even further. |
… called with -r, since that dependency is really only useful for people publishing releases. Relates to #3043
Ah, I guess you have |
Thanks @cmsj for the details, I never even knew about As I was typing this reply I see you correctly guessed that I have Anything else I can do or provide details wise to help make this better I am happy to. |
Absolutely agree that Python on macOS is a disaster, which is partly why I just bluntly hardcode the system Python/Pip, so at least I know we're always using the same environment. FWIW I've started work on porting the docstrings extraction code to Swift. There's quite a bit to do though, and then it'll need extensive testing to try and avoid regressions. if you need to be doing builds now, probably the quickest option would be disabling that PIP_REQUIRE variable, if you can live with the system Python installing a few modules. |
Got it. I was able to get further with
|
@cmsj I figured out a way to build successfully! 🚀 In case you're curious, here are the steps I ended up with: 1. install prerequisites (put the last 2 in your
2. clone repo, run installdeps:
3. replace
4. build:
bad news: even this freshly-minted build is still having the #3035 issue. Still stuck on what could possibly be causing that! |
Ok, so that As for the In short, I don't really like any of them. It feels to me like we're forcing Swift to do something that it's not very well suited to, and in the case of two of the three implementations (both using different featuresets of @randomeizer I'd be curious to know your thoughts, but atm I'm not at all convinced that it's worth pursuing that idea further. In the meantime, I've rejigged As for the |
In my quest to track down #3035 one thing I wanted to try was to compile on the latest Xcode / OS. So I sat down and tried to do what I've done in the past:
git clone https://github.com/Hammerspoon/hammerspoon.git
That used to work fine for me. Not anymore... 🤔
![image](https://user-images.githubusercontent.com/1992842/147018656-4d6949f0-8537-44d6-9097-9aaf3a76f9ab.png)
Ok, I see there's a new build system. So first thing I tried was just simply
Complained about missing deps (pygments, etc). Ok, let's try
Whoops... it wants to install a bunch of Python packages using the system Python (/usr/bin/python3) - yikes. And errors out:
Ok, so I have a working
virtualenv
setup and Python 3.9 via Homebrew, so:And then a few quick edits to the build scripts to use the venv flavors of
pip
andpython
:...Then:
Hmm, ok:
$ PATH=/Users/luke/.gem/ruby/2.6.0/bin:$PATH $ ./scripts/build.sh clean $ ./scripts/build.sh build
(wall of warnings.........)
![image|300](https://user-images.githubusercontent.com/1992842/147020012-d69c5c32-0fc1-4756-88a3-89bf608484ee.png)
...followed by:
So, something's wrong with building the docs, ehhh well I don't really need to build those anyway. Let me try the
-d
(debug) and-l
flag (lint only, don't build docs):At this point I am ready to throw in the towel. Probably I'm missing something obvious but...
Please help 😐 @cmsj @asmagill
The text was updated successfully, but these errors were encountered: