Coder Social home page Coder Social logo

Homebrew formula about pgcli HOT 15 CLOSED

dbcli avatar dbcli commented on August 23, 2024
Homebrew formula

from pgcli.

Comments (15)

amjith avatar amjith commented on August 23, 2024

Awesome!! I'll give it a shot.

I notice that you have depends_on :postgresql. Will that force an install of postgres via brew even if someone has postgres installed via a different mechanism (say PostgresApp or MacPorts)?

from pgcli.

tvon avatar tvon commented on August 23, 2024

This is true, I can try removing that dep as it may not be necessary for psycopg to build.

On Jan 7, 2015, at 5:43 PM, Amjith Ramanujam [email protected] wrote:

Awesome!! I'll give it a shot.

I notice that you have depends_on :postgresql. Will that force an install of postgres via brew even if someone has postgres installed via a different mechanism (say PostgresApp or MacPorts)?


Reply to this email directly or view it on GitHub.

from pgcli.

amjith avatar amjith commented on August 23, 2024

Regarding a test. Can you just do pgcli --help?

from pgcli.

amjith avatar amjith commented on August 23, 2024

The url for pgcli seems to point to github instead of pypi. I'd probably set it to pypi (https://pypi.python.org/packages/source/p/pgcli/pgcli-0.10.2.tar.gz) so it's similar to the rest of the packages.

from pgcli.

keikoro avatar keikoro commented on August 23, 2024

Ohhh, looking forward to when this works properly. (:

from pgcli.

tvon avatar tvon commented on August 23, 2024

Switched to pypi and bumped to 0.10.2.

As for postgres, it is needed for psycopg2 to build, and AFAIK homebrew offers no means to check for existing/external installations outside of homebrew.

I suspect pgcli --help will be considered insufficient by homebrew since they don't like people using pgcli --version (as an example).

from pgcli.

amjith avatar amjith commented on August 23, 2024

I think having 'postgres' as a dependency is reasonable in this case.

I can't think of a better test than pgcli --help since this is an interactive app.

Thanks for updating the url to pypi.

Is there an automated way to compute the sha for all those packages?

from pgcli.

amjith avatar amjith commented on August 23, 2024

@tvon Will you be submitting a PR to homebrew or should I take over from here?

Please let me know.

from pgcli.

tvon avatar tvon commented on August 23, 2024

@amjith I went ahead and submitted Homebrew/legacy-homebrew#35709

There is no current means to compute the shas for the dependencies, I did it the hard way... Though it could be easily scripted.

from pgcli.

amjith avatar amjith commented on August 23, 2024

Thank you for submitting the PR.

After I asked you about the sha I went researching a little bit and found this script in the homebrew cookbook.

https://raw.githubusercontent.com/tdsmith/labmisc/master/mkpydeps

from pgcli.

tdsmith avatar tdsmith commented on August 23, 2024

I notice that you have depends_on :postgresql. Will that force an install of postgres via brew even if someone has postgres installed via a different mechanism (say PostgresApp or MacPorts)?

Two scenarios:

  • If pgcli is installed from a bottle (a Homebrew-generated binary package), depends_on :postgresql will force an installation of Homebrew postgresql.
  • If pgcli is installed from source, either because Homebrew does not provide a bottle or a user passes --build-from-source to brew install, Homebrew postgresql will only be installed if there is not another postgresql in $PATH.

Most users will experience the first condition.

from pgcli.

keikoro avatar keikoro commented on August 23, 2024

That doesn't really answer the original question though.
If I read your reply correctly, the answer is: yes, a brew install of pgcli will force a brew installation of postgresql even if the user previously installed Postgres via other means.

Could this lead to problems? (Especially for lesser experienced users.)

from pgcli.

tvon avatar tvon commented on August 23, 2024

Ah, yes, installing pgcli will force a brew installation of postgresql.

Generally speaking I don't think this will cause problems, but here are some potential pitfalls (in rough order of likelihood):

  1. The brew install is in the PATH before the non-brew install and the user relies on the command line tools. This may or may not be an issue depending on the tools being used, but it's worth mentioning (and easy for the user to check).
  2. The non-brew installation exists in the same place as homebrew. E.g., if the user installed homebrew by the recommended means to /usr/local and also has postgresql installed to /usr/local then the postgresql installation by homebrew will fail in the final step of the installation (where it links installed files to bin and lib) and pgcli won't be installed.
  3. The brew version of postgresql is protocol-incompatible with the non-brew installation. I don't think this is even currently possible (I think you can use psql 8.3 to connect to a postgres 9.4 server).

Does that answer your question?

from pgcli.

amjith avatar amjith commented on August 23, 2024

@tvon Thanks for working through the issues and addressing the requests of the homebrew maintainers.

I see that it is now merged. I'm grateful for your help and resolve in getting this done. :)

I'll update site to include the brew install method in install pages.

🎸

from pgcli.

amjith avatar amjith commented on August 23, 2024

http://pgcli.com/install is updated.

Thanks!

from pgcli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.