tbarnetlamb / hyphen

hyphen - access Haskell modules from Python
GNU General Public License v2.0
92 stars 9 forks source link

Install on debian Linux distros (Ubuntu) with one script #23

Closed InfamousPlatypus closed 1 year ago

InfamousPlatypus commented 2 years ago

This PR should make it so Hyphen will install itself by running a single script. `Install_Hyphen_deb.bash' It is tested and works up to deprecation errors.

InfamousPlatypus commented 2 years ago

Debian works up to where stopped by #22 OSX needs tested but I have no way of doing that. Windows is not in because I can't test until I do a restart and I hate doing that so I'm going to procrastinate by writing one .py to rule them.....

tbarnetlamb commented 2 years ago

Thanks for the PR! I should have time to review it tomorrow evening Eastern Time.

As I mentioned in #22, I think that the deprecation error you hit wasn't actually fatal. The problem seems to be that ghc can't find the Data.Hashable module. It's meant to have gotten installed by the lines

cabal install --reinstall --force-reinstalls --enable-shared text
cabal install --reinstall --force-reinstalls --enable-shared transformers
cabal install --reinstall --force-reinstalls --enable-shared mtl
cabal install --reinstall --force-reinstalls --enable-shared parsec
cabal install --reinstall --force-reinstalls --enable-shared hashable
cabal install --reinstall --force-reinstalls --enable-shared unordered-containers
cabal install --enable-shared --reinstall ghc-paths

in BUILDING.MD. I'll have to study your scripts tomorrow to see why that's not happening properly.

BTW, I can easily test OS X. (It's my main development environment.) So don't worry about that too much.

tbarnetlamb commented 2 years ago

Actually, looking at the scripts, I think the issue might be as simple as the following. When BUILDING.MD says in the Ubuntu instructions "You will then need to do all the cabal install --enable-shared", it doesn't just meant to run cabal install --enable-shared. It means to run this whole paragraph from the "Dynamic modules" section:

cabal install --reinstall --force-reinstalls --enable-shared text
cabal install --reinstall --force-reinstalls --enable-shared transformers
cabal install --reinstall --force-reinstalls --enable-shared mtl
cabal install --reinstall --force-reinstalls --enable-shared parsec
cabal install --reinstall --force-reinstalls --enable-shared hashable
cabal install --reinstall --force-reinstalls --enable-shared unordered-containers
cabal install --enable-shared --reinstall ghc-paths

I think if you put all of these in your bash script for Linux (like you did on OS X), it might work better...

tbarnetlamb commented 2 years ago

Sorry, I think there was a slight error in what I wrote before. I checked the CI scripts, and they don't quite have the paragraph above. They have the line

cabal v1-install --reinstall --force-reinstalls --enable-shared text transformers mtl parsec hashable unordered-containers ghc-paths

which I think will work better. (I think the cabal developers changed the semantics of the install subcommand, and when that happened I updated the CI instructions but not BUILDING.MD. I reckon I should update the instructions in BUILDING.MD to suggest the line above instead of the paragraph of code quoted in the previous comment...)