Skip to content
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

black 18.6b4 (new formula) #29382

Closed
wants to merge 4 commits into from
Closed

Conversation

orn688
Copy link
Contributor

@orn688 orn688 commented Jun 24, 2018

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

Adds a formula for Black, the uncompromising Python code formatter, addressing Black's issue #362.

@orn688 orn688 mentioned this pull request Jun 24, 2018
Formula/black.rb Outdated
end

def install
virtualenv_create(libexec, "python3")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Black requires at least Python 3.6, but I don't see anything in this file that prevents Homebrew from installing it under an earlier version of Python 3. Does something special need to be done?

I'm not familiar with Homebrew, so my apologies if this is not actually an issue.

Copy link
Contributor Author

@orn688 orn688 Jun 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JelleZijlstra That's a good point - I'm not a Homebrew expert and was unsure myself of whether this is an issue. After some research I couldn't find any way to ensure a certain version of a Homebrew formula dependency, but I finally stumbled upon the Homebrew FAQ (probably the first place I should've looked, but oh well) which states, on the subject of pinning package versions:

Note that pinned, outdated formulae that are depended on by another formula need to be upgraded when required as we do not allow formulae to be built against non-latest versions.

So long story short, installing Black via brew should automatically install and use Python 3.6 if it's not already installed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will use Homebrew's python, which is currently 3.6.5 and will very soon be 3.7.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fxcoudert Is this line necessary now that Homebrew's python is Python 3? According to the Python for Formula Authors docs you have to specify python3 when creating a virtualenv but it seems like that might be outdated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you need python3 there

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the entire line is redundant and should be deleted.

@ilovezfs ilovezfs added the new formula PR adds a new formula to Homebrew/homebrew-core label Jun 26, 2018
Formula/black.rb Outdated
class Black < Formula
include Language::Python::Virtualenv

desc "The uncompromising Python code formatter"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python code formatter is better: we want factual descriptions, not slogans :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, I'll fix that!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orn688 it looks like this line was not changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Not sure how I messed that up. Thanks for catching it!

Formula/black.rb Outdated
end

def install
virtualenv_create(libexec, "python3")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will use Homebrew's python, which is currently 3.6.5 and will very soon be 3.7.0

@fxcoudert fxcoudert added the almost there PR is nearly ready to merge label Jun 28, 2018
@orn688
Copy link
Contributor Author

orn688 commented Jul 5, 2018

@fxcoudert Sorry to bother you, is there anything else I need to do before this can be merged?

@orn688 orn688 force-pushed the add-black-formula branch from 718be20 to 5f01953 Compare July 7, 2018 20:16
@orn688
Copy link
Contributor Author

orn688 commented Jul 7, 2018

@ilovezfs Thanks for the feedback, I removed the unnecessary line.

@stale
Copy link

stale bot commented Jul 28, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale No recent activity label Jul 28, 2018
@hugovk
Copy link

hugovk commented Jul 29, 2018

@Stale Awaiting review.

@stale stale bot removed the stale No recent activity label Jul 29, 2018
@DomT4
Copy link
Member

DomT4 commented Aug 8, 2018

@BrewTestBot test this please

@DomT4 DomT4 dismissed fxcoudert’s stale review August 9, 2018 01:25

Requested changes were applied.

@DomT4
Copy link
Member

DomT4 commented Aug 9, 2018

Merged in 4dec1d2. Thank you for your contribution to Homebrew @orn688; we appreciate it! 😺

@DomT4 DomT4 closed this in 4dec1d2 Aug 9, 2018
@lock lock bot added the outdated PR was locked due to age label Sep 8, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
almost there PR is nearly ready to merge new formula PR adds a new formula to Homebrew/homebrew-core outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants