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

httpie: add python variants #6496

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

blazewicz
Copy link
Contributor

Description

httpie supports Python 3.6+, added variants for python36, python37 and python38

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 10.15.3
Xcode 11.3.1

Verification

Have you

@macportsbot
Copy link

Notifying maintainers:
@g5pw for port httpie.

@macportsbot macportsbot added maintainer: open Affects an openmaintainer port type: enhancement labels Mar 2, 2020
@g5pw
Copy link
Contributor

g5pw commented Mar 2, 2020

Hello @blazewicz, thanks for this PR. I question the usage for variants for setting the python version to install the library to, AFAIK this is not used as a library, so we should (IMO) just track the latest version.

@blazewicz
Copy link
Contributor Author

Hi @g5pw I've noticed there is a bit of inconsistency among different python backed app ports.

There are ports like httpie which tracks latest python version, others like pgcli which use variants and finally ports like py-awscli which use subports. None of them are usable as libraries.

I like the choice of Python version used by my apps because I can limit number of dependencies installed on my system. If I want or for some reason need to keep using python37 I don't want to be forced to install python38 and duplicate dozen of dependencies which could be shared.

Sadly documentation lacks guidelines for this kind of situations.

@emcrisostomo
Copy link
Member

emcrisostomo commented Mar 2, 2020

Hi @blazewicz, @g5pw, I'm the maintainer of the py-awscli port and a few days ago, while writing the docker-compose port file, I've checked the python port group sources and noticed this:

# Usage:
# name should be of the form py-foo for modules
# subports pyXY-foo are declared for each XY in python.versions

# for apps (i.e. not named py-foo), no subports will be defined
# only the python.default_version will be used
# you can change that in variants if you want

Hence, it seems the guideline in this case would be:

  • using python.default_version.
  • not using subports.
  • change that in variants if you want/need to.

My two cents. I'm actually planning to migrate the py-awscli port into the awscli port in order to align it to what the guidelines expect.

@macportsbot
Copy link

Travis Build #10598 Passed.

Lint results
--->  Verifying Portfile for httpie
--->  0 errors and 0 warnings found.

Port httpie success on xcode10.3. Log
Port httpie success on xcode9.4. Log
Port httpie success on xcode8.3. Log
Port httpie success on xcode7.3. Log

@blazewicz
Copy link
Contributor Author

Hi @emcrisostomo thanks for pointing that, I didn't look there. This approach seems most intuitive. If someone needs awscli he would rather try to run port install awscli, for end user it doesn't matter which python version is used underneath. I'm curious why #1074 was approved, but this is not a good place for this discussion.

@g5pw please confirm if you'd like me to remove the variants and I'll limit this PR to python version bump

@emcrisostomo
Copy link
Member

@g5pw, @blazewicz, what about just bumping the default python version to 38 and remove variants? Is anybody requesting them? In the absence of such a request, we gracefully move users to Python 3.8 and hopefully more and more ports.

@g5pw
Copy link
Contributor

g5pw commented Mar 2, 2020

Honestly, I don't really have a strong opinion one way or another, and there's no real consensus on what is appropriate to do. Having a single version to install and test would probably be easier to maintain in the long run.

I'm curious why #1074 was approved, but this is not a good place for this discussion.

Yeah, me too, but probably it's just the fact that there is no standard on what to do for non-library python ports.

@blazewicz, if you tested the port on all supported python versions, I'll go ahead and merge this, in the meantime I'll open up a discussion on what to do in the future. Thank you all!

@emcrisostomo
Copy link
Member

@blazewicz Would you please confirm you tested the port on all supported python versions, so that we can go ahead and merge? Thanks.

@blazewicz
Copy link
Contributor Author

@emcrisostomo I confirm, it does work with all variants

@g5pw
Copy link
Contributor

g5pw commented Mar 3, 2020

Ok, thank you @blazewicz, I’m merging this!

@g5pw g5pw merged commit 8703e5c into macports:master Mar 3, 2020
@blazewicz blazewicz deleted the httpie-add-python-variants branch March 4, 2020 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer: open Affects an openmaintainer port type: enhancement
4 participants