Remove 3.6 support / discontinue less available platforms (#1267)

* Remove redundant systems

* Drop it from the docs

* Remove the packaging info about the legacy systems

* Fix some typos

* Drop support for python 3.6
This commit is contained in:
Batuhan Taskaya 2022-01-14 19:49:05 +03:00 committed by GitHub
parent 87629706c9
commit cd877a5e08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 13 additions and 646 deletions

View File

@ -19,6 +19,7 @@ jobs:
run: | run: |
httpie.http --version httpie.http --version
httpie.https --version httpie.https --version
httpie --version
# Auto-aliases cannot be tested when installing a snap outside the store. # Auto-aliases cannot be tested when installing a snap outside the store.
# http --version # http --version
# https --version # https --version

View File

@ -20,7 +20,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] python-version: [3.7, 3.8, 3.9, "3.10"]
pyopenssl: [0, 1] pyopenssl: [0, 1]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View File

@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
## [3.0.0.dev0](https://github.com/httpie/httpie/compare/2.6.0...master) (unreleased) ## [3.0.0.dev0](https://github.com/httpie/httpie/compare/2.6.0...master) (unreleased)
- Drop support for Python 3.6. ([#1177](https://github.com/httpie/httpie/issues/1177))
- Improved startup time by 40%. ([#1211](https://github.com/httpie/httpie/pull/1211)) - Improved startup time by 40%. ([#1211](https://github.com/httpie/httpie/pull/1211))
- Added support for nested JSON syntax. ([#1169](https://github.com/httpie/httpie/issues/1169)) - Added support for nested JSON syntax. ([#1169](https://github.com/httpie/httpie/issues/1169))
- Added `httpie plugins` interface for plugin management. ([#566](https://github.com/httpie/httpie/issues/566)) - Added `httpie plugins` interface for plugin management. ([#566](https://github.com/httpie/httpie/issues/566))

View File

@ -162,7 +162,7 @@ oversight. Ping one of the maintainers to get a `benchmark` label on your branch
If you are on a Windows machine and not able to run `make`, If you are on a Windows machine and not able to run `make`,
follow the next steps for a basic setup. As a prerequisite, you need to have follow the next steps for a basic setup. As a prerequisite, you need to have
Python 3.6+ installed. Python 3.7+ installed.
Create a virtual environment and activate it: Create a virtual environment and activate it:

View File

@ -60,7 +60,7 @@ Do not edit here, but in docs/installation/.
#### PyPI #### PyPI
Please make sure you have Python 3.6 or newer (`python --version`). Please make sure you have Python 3.7 or newer (`python --version`).
```bash ```bash
# Install httpie # Install httpie
@ -108,20 +108,6 @@ $ port selfupdate
$ port upgrade httpie $ port upgrade httpie
``` ```
#### Spack (macOS)
To install [Spack](https://spack.readthedocs.io/en/latest/index.html), see [its installation](https://spack.readthedocs.io/en/latest/getting_started.html#installation).
```bash
# Install httpie
$ spack install httpie
```
```bash
# Upgrade httpie
$ spack install httpie
```
### Windows ### Windows
#### Chocolatey #### Chocolatey
@ -213,34 +199,6 @@ $ yum install httpie
$ yum upgrade httpie $ yum upgrade httpie
``` ```
#### Alpine Linux
```bash
# Install httpie
$ apk update
$ apk add httpie
```
```bash
# Upgrade httpie
$ apk update
$ apk add --upgrade httpie
```
#### Gentoo
```bash
# Install httpie
$ emerge --sync
$ emerge httpie
```
```bash
# Upgrade httpie
$ emerge --sync
$ emerge --update httpie
```
#### Arch Linux #### Arch Linux
Also works for other Arch-derived distributions like ArcoLinux, EndeavourOS, Artix Linux, etc. Also works for other Arch-derived distributions like ArcoLinux, EndeavourOS, Artix Linux, etc.
@ -255,34 +213,6 @@ $ pacman -Sy httpie
$ pacman -Syu httpie $ pacman -Syu httpie
``` ```
#### Void Linux
```bash
# Install httpie
$ xbps-install -Su
$ xbps-install -S httpie
```
```bash
# Upgrade httpie
$ xbps-install -Su
$ xbps-install -Su httpie
```
#### Spack (Linux)
To install [Spack](https://spack.readthedocs.io/en/latest/index.html), see [its installation](https://spack.readthedocs.io/en/latest/getting_started.html#installation).
```bash
# Install httpie
$ spack install httpie
```
```bash
# Upgrade httpie
$ spack install httpie
```
### FreeBSD ### FreeBSD
#### FreshPorts #### FreshPorts

View File

@ -14,7 +14,6 @@ docs-structure:
macOS: macOS:
- brew-mac - brew-mac
- port - port
- spack-mac
Windows: Windows:
- chocolatey - chocolatey
Linux: Linux:
@ -23,29 +22,11 @@ docs-structure:
- apt - apt
- dnf - dnf
- yum - yum
- apk
- emerge
- pacman - pacman
- xbps-install
- spack-linux
FreeBSD: FreeBSD:
- pkg - pkg
tools: tools:
apk:
title: Alpine Linux
name: apk
links:
homepage: https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management
package: https://pkgs.alpinelinux.org/package/edge/community/x86/httpie
commands:
install:
- apk update
- apk add httpie
upgrade:
- apk update
- apk add --upgrade httpie
apt: apt:
title: Debian and Ubuntu title: Debian and Ubuntu
note: Also works for other Debian-derived distributions like MX Linux, Linux Mint, deepin, Pop!_OS, KDE neon, Zorin OS, elementary OS, Kubuntu, Devuan, Linux Lite, Peppermint OS, Lubuntu, antiX, Xubuntu, etc. note: Also works for other Debian-derived distributions like MX Linux, Linux Mint, deepin, Pop!_OS, KDE neon, Zorin OS, elementary OS, Kubuntu, Devuan, Linux Lite, Peppermint OS, Lubuntu, antiX, Xubuntu, etc.
@ -116,20 +97,6 @@ tools:
upgrade: upgrade:
- dnf upgrade httpie - dnf upgrade httpie
emerge:
title: Gentoo
name: Portage
links:
homepage: https://wiki.gentoo.org/wiki/Portage
package: https://packages.gentoo.org/packages/net-misc/httpie
commands:
install:
- emerge --sync
- emerge httpie
upgrade:
- emerge --sync
- emerge --update httpie
pacman: pacman:
title: Arch Linux title: Arch Linux
name: pacman name: pacman
@ -173,7 +140,7 @@ tools:
pypi: pypi:
title: PyPI title: PyPI
name: pip name: pip
note: Please make sure you have Python 3.6 or newer (`python --version`). note: Please make sure you have Python 3.7 or newer (`python --version`).
links: links:
homepage: https://pypi.org/ homepage: https://pypi.org/
# setup: https://pip.pypa.io/en/stable/installation/ # setup: https://pip.pypa.io/en/stable/installation/
@ -199,43 +166,6 @@ tools:
upgrade: upgrade:
- snap refresh httpie - snap refresh httpie
spack-linux:
title: Spack (Linux)
name: Spack
links:
homepage: https://spack.readthedocs.io/en/latest/index.html
setup: https://spack.readthedocs.io/en/latest/getting_started.html#installation
commands:
install:
- spack install httpie
upgrade:
- spack install httpie
spack-mac:
title: Spack (macOS)
name: Spack
links:
homepage: https://spack.readthedocs.io/en/latest/index.html
setup: https://spack.readthedocs.io/en/latest/getting_started.html#installation
commands:
install:
- spack install httpie
upgrade:
- spack install httpie
xbps-install:
title: Void Linux
name: XBPS
links:
homepage: https://docs.voidlinux.org/xbps/index.html
commands:
install:
- xbps-install -Su
- xbps-install -S httpie
upgrade:
- xbps-install -Su
- xbps-install -Su httpie
yum: yum:
title: CentOS and RHEL title: CentOS and RHEL
name: Yum name: Yum

View File

@ -12,11 +12,11 @@ You are looking at the HTTPie packaging documentation, where you will find valua
The overall release process starts simple: The overall release process starts simple:
1. Do the [PyPi](https://pypi.org/project/httpie/) publication. 1. Do the [PyPI](https://pypi.org/project/httpie/) publication.
2. Then, handle company-related tasks. 2. Then, handle company-related tasks.
3. Finally, follow OS-specific steps, described in documents below, to send patches downstream. 3. Finally, follow OS-specific steps, described in documents below, to send patches downstream.
## First, PyPi ## First, PyPI
Let's do the release on [PyPi](https://pypi.org/project/httpie/). Let's do the release on [PyPi](https://pypi.org/project/httpie/).
That is done quite easily by manually triggering the [release workflow](https://github.com/httpie/httpie/actions/workflows/release.yml). That is done quite easily by manually triggering the [release workflow](https://github.com/httpie/httpie/actions/workflows/release.yml).
@ -34,18 +34,13 @@ A more complete state of deployment can be found on [repology](https://repology.
| OS | Maintainer | | OS | Maintainer |
| -------------------------------------------: | -------------- | | -------------------------------------------: | -------------- |
| [Alpine](linux-alpine/) | **HTTPie** |
| [Arch Linux, and derived](linux-arch/) | trusted person | | [Arch Linux, and derived](linux-arch/) | trusted person |
| :construction: [AOSC OS](linux-aosc/) | **HTTPie** |
| [CentOS, RHEL, and derived](linux-centos/) | trusted person | | [CentOS, RHEL, and derived](linux-centos/) | trusted person |
| [Debian, Ubuntu, and derived](linux-debian/) | trusted person | | [Debian, Ubuntu, and derived](linux-debian/) | trusted person |
| [Fedora](linux-fedora/) | trusted person | | [Fedora](linux-fedora/) | trusted person |
| [Gentoo](linux-gentoo/) | **HTTPie** |
| :construction: [Homebrew, Linuxbrew](brew/) | **HTTPie** | | :construction: [Homebrew, Linuxbrew](brew/) | **HTTPie** |
| :construction: [MacPorts](mac-ports/) | **HTTPie** | | :construction: [MacPorts](mac-ports/) | **HTTPie** |
| [Snapcraft](snapcraft/) | **HTTPie** | | [Snapcraft](snapcraft/) | **HTTPie** |
| [Spack](spack/) | **HTTPie** |
| [Void Linux](linux-void/) | **HTTPie** |
| [Windows — Chocolatey](windows-chocolatey/) | **HTTPie** | | [Windows — Chocolatey](windows-chocolatey/) | **HTTPie** |
:new: You do not find your system or you would like to see HTTPie supported on another OS? Then [let us know](https://github.com/httpie/httpie/issues/). :new: You do not find your system or you would like to see HTTPie supported on another OS? Then [let us know](https://github.com/httpie/httpie/issues/).

View File

@ -1,41 +0,0 @@
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor: Daniel Isaksen <d@duniel.no>
# Contributor: Mickaël Schoentgen <mickael@apible.io>
pkgname=httpie
pkgver=2.6.0
pkgrel=0
pkgdesc="Modern, user-friendly command-line HTTP client for the API era"
url="https://httpie.org/"
arch="noarch"
license="BSD-3-Clause"
depends="
python3
py3-setuptools
py3-requests
py3-pygments
py3-requests-toolbelt
py3-pysocks
py3-defusedxml
py3-charset-normalizer
"
checkdepends="py3-pytest py3-pytest-httpbin py3-responses"
source="https://files.pythonhosted.org/packages/source/h/httpie/httpie-$pkgver.tar.gz"
# secfixes:
# 1.0.3-r0:
# - CVE-2019-10751
build() {
python3 setup.py build
}
check() {
python3 -m pytest ./httpie ./tests
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="a38e9769c1994fcb4e5f898e5a72283c636ea155f1fc4d594eb59c43fe98115335dec4fddd6d4e396bd11b674715c573d2fc40c4afb732ba31da0cb8e2068fd2 httpie-2.6.0.tar.gz"

View File

@ -1,67 +0,0 @@
# HTTPie on Alpine Linux
Welcome to the documentation about **packaging HTTPie for Alpine Linux**.
- If you do not know HTTPie, have a look [here](https://httpie.io/cli).
- If you are looking for HTTPie installation or upgrade instructions on Alpine Linux, then you can find them on [that page](https://httpie.io/docs#alpine-linux).
- If you are looking for technical information about the HTTPie packaging on Alpine Linux, then you are in a good place.
## About
This document contains technical details, where we describe how to create a patch for the latest HTTPie version for Alpine Linux.
We will discuss setting up the environment, installing development tools, installing and testing changes before submitting a patch downstream.
## Overall process
Open a pull request to update the [downstream file](https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/httpie/APKBUILD) ([example](https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/25075)).
Notes:
- The `pkgrel` value must be set to `0`.
- The commit message must be `community/httpie: upgrade to XXX`.
- The commit must be signed-off (`git commit -s`).
## Hacking
Launch the docker image:
```bash
docker pull alpine
docker run -it --rm alpine
```
From inside the container:
```bash
# Install tools
apk add alpine-sdk sudo
# Add a user (password required)
adduser me
addgroup me abuild
echo "me ALL=(ALL) ALL" >> /etc/sudoers
# Switch user
su - me
# Create a private key (not used but required)
abuild-keygen -a -i
# Clone
git clone --depth=1 https://gitlab.alpinelinux.org/alpine/aports.git
cd aports/community/httpie
# Retrieve the patch of the latest HTTPie version
curl https://raw.githubusercontent.com/httpie/httpie/master/docs/packaging/linux-alpine/APKBUILD \
-o APKBUILD
# Build the package
abuild -r
# Install the package
sudo apk add --repository ~/packages/community httpie
# And test it!
http --version
https --version
```

View File

@ -1,24 +0,0 @@
# HTTPie on AOSC OS
Welcome to the documentation about **packaging HTTPie for AOSC OS**.
- If you do not know HTTPie, have a look [here](https://httpie.io/cli).
- If you are looking for technical information about the HTTPie packaging on AOSC OS, then you are in a good place.
## About
This document contains technical details, where we describe how to create a patch for the latest HTTPie version for AOSC OS.
We will discuss setting up the environment, installing development tools, installing and testing changes before submitting a patch downstream.
## Overall process
Open a pull request to update the [downstream file](https://github.com/AOSC-Dev/aosc-os-abbs/blob/stable/extra-web/httpie/spec) ([example](https://github.com/AOSC-Dev/aosc-os-abbs/commit/d0d3ba0bcea347387bb582a1b0b1b4e518720c80)).
Notes:
- The commit message must be `httpie: update to XXX`.
- The commit must be signed-off (`git commit -s`).
## Hacking
:construction: Work in progress.

View File

@ -1,8 +0,0 @@
PKGNAME=httpie
PKGSEC=utils
PKGDEP="charset-normalizer defusedxml requests toolbelt pygments pysocks"
PKGDES="Modern, user-friendly command-line HTTP client for the API era"
ABHOST=noarch
ABTYPE=python
NOPYTHON2=1

View File

@ -1,5 +0,0 @@
VER=2.5.0
SRCS="tbl::https://github.com/httpie/httpie/archive/$VER.tar.gz"
CHKSUMS="sha256::66af56e0efc1ca6237323f1186ba34bca1be24e67a4319fd5df7228ab986faea"
REL=1
CHKUPDATE="anitya::id=1337"

View File

@ -1,3 +0,0 @@
DIST httpie-2.4.0.tar.gz 1772537 BLAKE2B 111451cc7dc353d5b586554f98ac715a3198f03e74d261944a5f021d2dcc948455500800222b323d182a2a067d0549bda7c318ab3a6c934b9a9beec64aff2db2 SHA512 44cc7ff4fe0f3d8c53a7dd750465f6b56c36f5bbac06d22b760579bd60949039e82313845699669a659ec91adc69dbeac22c06ddd63af64e6f2e0edecf3e732a
DIST httpie-2.5.0.tar.gz 1105177 BLAKE2B 6e16868c81522d4e6d2fc0a4e093c190f18ced720b35217930865ae3f8e168193cc33dfecc13c5d310f52647d6e79d17b247f56e56e8586d633a2d9502be66a7 SHA512 f14aa23fea7578181b9bd6ededea04de9ddf0b2f697b23f76d2d96e2c17b95617318c711750bad6af550400dbc03732ab17fdf84e59d577f33f073e600a55330
DIST httpie-2.6.0.tar.gz 1133495 BLAKE2B 3ac61fc68ab59ac7523b030a8c7af85c4af05357aa19282b514b813351efabe783f47ab82d292117e0a9170ff793b71356941dc4eb159c585629cae3adec9b5a SHA512 acd7dc847b67e27909c49ccddec84321c4d73fa5b49f06ce3d94d790093a8f168a1c6627bc4921ca8c0e48b9904f38e17935b645495e2313d16ac2eecf659038

View File

@ -1,78 +0,0 @@
# HTTPie on Gentoo
Welcome to the documentation about **packaging HTTPie for Gentoo**.
- If you do not know HTTPie, have a look [here](https://httpie.io/cli).
- If you are looking for HTTPie installation or upgrade instructions on Gentoo, then you can find them on [that page](https://httpie.io/docs#gentoo).
- If you are looking for technical information about the HTTPie packaging on Gentoo, then you are in a good place.
## About
This document contains technical details, where we describe how to create a patch for the latest HTTPie version for Gentoo.
We will discuss setting up the environment, installing development tools, installing and testing changes before submitting a patch downstream.
## Overall process
Open a pull request to create `httpie-XXX.ebuild` and update `Manifest` ([example](https://github.com/gentoo/gentoo/pull/22576)).
- Here is how to calculate the size and checksum (replace `2.5.0` with the correct version):
```bash
# Download
$ wget https://github.com/httpie/httpie/archive/2.5.0.tar.gz
# Size
$ stat --printf="%s\n" 2.5.0.tar.gz
1105177
# Checksum
$ openssl dgst -blake2b512 2.5.0.tar.gz
BLAKE2b512(2.5.0.tar.gz)= 6e16868c81522d4e6d2fc0a4e093c190f18ced720b35217930865ae3f8e168193cc33dfecc13c5d310f52647d6e79d17b247f56e56e8586d633a2d9502be66a7
```
- The commit message must be `net-misc/httpie: version bump to XXX`.
- The commit must be signed-off (`git commit -s`).
## Hacking
Launch the docker image:
```bash
docker pull gentoo/stage3
docker run -it --rm gentoo/stage3
```
From inside the container:
```bash
# Install tools
emerge --sync
emerge pkgcheck repoman
# Go to the package location
cd /var/db/repos/gentoo/net-misc/httpie
# Retrieve the patch of the latest HTTPie version
# (only files that were modified since the previous release)
curl https://raw.githubusercontent.com/httpie/httpie/master/docs/packaging/linux-gentoo/httpie-XXX.ebuild \
-o httpie-XXX.ebuild
curl https://raw.githubusercontent.com/httpie/httpie/master/docs/packaging/linux-gentoo/Manifest \
-o Manifest
curl https://raw.githubusercontent.com/httpie/httpie/master/docs/packaging/linux-gentoo/metadata.xml \
-o metadata.xml
# Basic checks
repoman manifest
repoman full -d -x
pkgcheck scan
# Build and install the package
emerge --with-test-deps httpie-XXX.ebuild
# Run the tests suite
ebuild httpie-XXX.ebuild clean test
# And test it!
http --version
https --version
```

View File

@ -1,43 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_{8,9,10} )
PYTHON_REQ_USE="ssl(+)"
inherit bash-completion-r1 distutils-r1
DESCRIPTION="Modern, user-friendly command-line HTTP client for the API era"
HOMEPAGE="https://httpie.io/ https://pypi.org/project/httpie/"
SRC_URI="https://github.com/httpie/httpie/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="
dev-python/charset_normalizer[${PYTHON_USEDEP}]
dev-python/defusedxml[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
>=dev-python/requests-2.22.0[${PYTHON_USEDEP}]
>=dev-python/requests-toolbelt-0.9.1[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
${RDEPEND}
dev-python/pyopenssl[${PYTHON_USEDEP}]
dev-python/pytest-httpbin[${PYTHON_USEDEP}]
dev-python/responses[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
python_install_all() {
newbashcomp extras/httpie-completion.bash http
insinto /usr/share/fish/vendor_completions.d
newins extras/httpie-completion.fish http.fish
distutils-r1_python_install_all
}

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<longdescription lang="en">
HTTPie (pronounced aitch-tee-tee-pie) is a command line HTTP
client. Its goal is to make CLI interaction with web services as
human-friendly as possible. It provides a simple http command
that allows for sending arbitrary HTTP requests using a simple
and natural syntax, and displays colorized output. HTTPie can be
used for testing, debugging, and generally interacting with HTTP
servers.
</longdescription>
<upstream>
<bugs-to>https://github.com/httpie/httpie/issues</bugs-to>
<changelog>https://raw.githubusercontent.com/httpie/httpie/master/CHANGELOG.md</changelog>
<doc>https://httpie.io/docs</doc>
<remote-id type="github">httpie/httpie</remote-id>
<remote-id type="pypi">httpie</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1,73 +0,0 @@
# HTTPie on Void Linux
Welcome to the documentation about **packaging HTTPie for Void Linux**.
- If you do not know HTTPie, have a look [here](https://httpie.io/cli).
- If you are looking for HTTPie installation or upgrade instructions on Void Linux, then you can find them on [that page](https://httpie.io/docs#void-linux).
- If you are looking for technical information about the HTTPie packaging on Void Linux, then you are in a good place.
## About
This document contains technical details, where we describe how to create a patch for the latest HTTPie version for Void Linux.
We will discuss setting up the environment, installing development tools, installing and testing changes before submitting a patch downstream.
## Overall process
Open a pull request to update the [downstream file](https://github.com/void-linux/void-packages/blob/master/srcpkgs/httpie/template) ([example](https://github.com/void-linux/void-packages/pull/33539)).
- The `revision` must be set to `0`.
- The commit message must be `httpie: update to XXX.`.
- The commit must be signed-off (`git commit -s`).
## Hacking
Launch the docker image:
```bash
docker pull voidlinux/voidlinux
docker run -it --rm voidlinux/voidlinux
```
From inside the container:
```bash
# Sync and upgrade once, assume error comes from xbps update
xbps-install -Syu
# Install tools
xbps-install -y git xtools file util-linux binutils bsdtar coreutils
# Clone
git clone --depth=1 git://github.com/void-linux/void-packages.git void-packages-src
cd void-packages-src
# Retrieve the patch of the latest HTTPie version
curl https://raw.githubusercontent.com/httpie/httpie/master/docs/packaging/linux-void/template \
-o srcpkgs/httpie/template
# Check the package
xlint srcpkgs/httpie/template
# Link / to /masterdir
ln -s / masterdir
# Enable ethereal chroot-style
echo XBPS_BUILD_ENVIRONMENT=void-packages-ci >> etc/conf
echo XBPS_ALLOW_RESTRICTED=yes >> etc/conf
echo XBPS_CHROOT_CMD=ethereal >> etc/conf
echo XBPS_ALLOW_CHROOT_BREAKOUT=yes >> etc/conf
export XBPS_ALLOW_CHROOT_BREAKOUT=yes
./xbps-src binary-bootstrap
./xbps-src chroot
# Build the package
cd void-packages
export SOURCE_DATE_EPOCH=0
./xbps-src pkg httpie
# Install the package
xbps-install --repository=hostdir/binpkgs httpie
# And finally test it!
http --version
https --version
```

View File

@ -1,29 +0,0 @@
# Template file for 'httpie'
pkgname=httpie
version=2.6.0
revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3-setuptools python3-requests python3-requests-toolbelt
python3-Pygments python3-pysocks python3-defusedxml
python3-charset-normalizer"
short_desc="Modern, user-friendly command-line HTTP client for the API era"
maintainer="Jakub Roztocil <jakub@roztocil.co>"
license="BSD-3-Clause"
homepage="https://httpie.io/"
changelog="https://raw.githubusercontent.com/httpie/httpie/master/CHANGELOG.md"
distfiles="https://github.com/httpie/httpie/archive/${version}.tar.gz"
checksum=3bcd9a8cb2b11299da12d3af36c095c6d4b665e41c395898a07f1ae4d99fc14a
make_check=no # needs pytest_httpbin which is not packaged
post_install() {
vcompletion extras/httpie-completion.bash bash http
vcompletion extras/httpie-completion.fish fish http
vlicense LICENSE
}
python3-httpie_package() {
build_style=meta
short_desc+=" (transitional dummy package)"
depends="httpie>=${version}_${revision}"
}

View File

@ -20,15 +20,12 @@ platforms darwin
license BSD license BSD
homepage https://httpie.io/ homepage https://httpie.io/
variant python36 conflicts python37 python38 python39 python310 description "Use Python 3.6" {}
variant python37 conflicts python36 python38 python39 python310 description "Use Python 3.7" {} variant python37 conflicts python36 python38 python39 python310 description "Use Python 3.7" {}
variant python38 conflicts python36 python37 python39 python310 description "Use Python 3.8" {} variant python38 conflicts python36 python37 python39 python310 description "Use Python 3.8" {}
variant python39 conflicts python36 python37 python38 python310 description "Use Python 3.9" {} variant python39 conflicts python36 python37 python38 python310 description "Use Python 3.9" {}
variant python310 conflicts python36 python37 python38 python39 description "Use Python 3.10" {} variant python310 conflicts python36 python37 python38 python39 description "Use Python 3.10" {}
if {[variant_isset python36]} { if {[variant_isset python37]} {
python.default_version 36
} elseif {[variant_isset python37]} {
python.default_version 37 python.default_version 37
} elseif {[variant_isset python39]} { } elseif {[variant_isset python39]} {
python.default_version 39 python.default_version 39

View File

@ -1,50 +0,0 @@
# HTTPie on Spack
Welcome to the documentation about **packaging HTTPie for Spack**.
- If you do not know HTTPie, have a look [here](https://httpie.io/cli).
- If you are looking for HTTPie installation or upgrade instructions on Spack, then you can find them on [that page](https://httpie.io/docs#spack-linux) ([that one](https://httpie.io/docs#spack-macos) for macOS).
- If you are looking for technical information about the HTTPie packaging on Spack, then you are in a good place.
## About
This document contains technical details, where we describe how to create a patch for the latest HTTPie version for Spack. They apply to Spack on Linux, and macOS.
We will discuss setting up the environment, installing development tools, installing and testing changes before submitting a patch downstream.
## Overall process
Open a pull request to update the [downstream file](https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/httpie/package.py) ([example](https://github.com/spack/spack/pull/25888)).
- The commit message must be `httpie: add vXXX`.
- The commit must be signed-off (`git commit -s`).
## Hacking
Launch the docker image:
```bash
docker pull spack/centos7
docker run -it --rm spack/centos7
```
From inside the container:
```bash
# Retrieve the patch of the latest HTTPie version
curl https://raw.githubusercontent.com/httpie/httpie/master/docs/packaging/spack/package.py \
-o /opt/spack/var/spack/repos/builtin/packages/httpie/package.py
# Check available versions (it should show the new version)
spack versions httpie
# Check the package
spack spec httpie@XXX
# Install the package
spack install httpie@XXX
spack load httpie
# And test it!
http --version
https --version
```

View File

@ -1,36 +0,0 @@
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Httpie(PythonPackage):
"""Modern, user-friendly command-line HTTP client for the API era."""
homepage = 'https://httpie.io/'
pypi = 'httpie/httpie-2.6.0.tar.gz'
maintainers = ['jakubroztocil']
version('2.6.0', sha256='ef929317b239bbf0a5bb7159b4c5d2edbfc55f8a0bcf9cd24ce597daec2afca5')
version('2.5.0', sha256='fe6a8bc50fb0635a84ebe1296a732e39357c3e1354541bf51a7057b4877e47f9')
# TODO: Remove both versions for HTTPie 2.7.0.
version('0.9.9', sha256='f1202e6fa60367e2265284a53f35bfa5917119592c2ab08277efc7fffd744fcb', deprecated=True)
version('0.9.8', sha256='515870b15231530f56fe2164190581748e8799b66ef0fe36ec9da3396f0df6e1', deprecated=True)
depends_on('python@3.6:', when='@2.5:', type=('build', 'run'))
depends_on('py-setuptools', type=('build', 'run'))
depends_on('py-charset-normalizer@2:', when='@2.6:', type=('build', 'run'))
depends_on('py-defusedxml@0.6:', when='@2.5:', type=('build', 'run'))
depends_on('py-pygments@2.1.3:', type=('build', 'run'))
depends_on('py-pygments@2.5.2:', when='@2.5:', type=('build', 'run'))
depends_on('py-requests@2.11:', type=('build', 'run'))
depends_on('py-requests@2.22:+socks', when='@2.5:', type=('build', 'run'))
depends_on('py-requests-toolbelt@0.9.1:', when='@2.5:', type=('build', 'run'))
# TODO: Remove completely py-argparse for HTTPie 2.7.0.
# Concretization problem breaks this. Unconditional for now...
# https://github.com/spack/spack/issues/3628
# depends_on('py-argparse@1.2.1:', type=('build', 'run'),
# when='^python@:2.6,3.0:3.1')
depends_on('py-argparse@1.2.1:', type=('build', 'run'), when='^python@:2.6')

View File

@ -41,7 +41,7 @@ Main features:
<docsUrl>https://httpie.io/docs</docsUrl> <docsUrl>https://httpie.io/docs</docsUrl>
<bugTrackerUrl>https://github.com/httpie/httpie/issues</bugTrackerUrl> <bugTrackerUrl>https://github.com/httpie/httpie/issues</bugTrackerUrl>
<dependencies> <dependencies>
<dependency id="python3" version="3.6" /> <dependency id="python3" version="3.7" />
</dependencies> </dependencies>
</metadata> </metadata>
<files> <files>

View File

@ -4,9 +4,9 @@ import warnings
from itertools import groupby from itertools import groupby
from operator import attrgetter from operator import attrgetter
from typing import Dict, List, Type, Iterator, TypeVar, Optional, ContextManager from typing import Dict, List, Type, Iterator, Optional, ContextManager
from pathlib import Path from pathlib import Path
from contextlib import contextmanager from contextlib import contextmanager, nullcontext
from ..compat import importlib_metadata, find_entry_points, get_dist_name from ..compat import importlib_metadata, find_entry_points, get_dist_name
@ -34,15 +34,6 @@ def _load_directory(plugins_dir: Path) -> Iterator[None]:
sys.path.remove(plugins_path) sys.path.remove(plugins_path)
T = TypeVar("T")
@contextmanager
def nullcontext(obj: Optional[T] = None) -> Iterator[Optional[T]]:
# A naive replacement of the nullcontext() for 3.6
yield obj
def enable_plugins(plugins_dir: Optional[Path]) -> ContextManager[None]: def enable_plugins(plugins_dir: Optional[Path]) -> ContextManager[None]:
if plugins_dir is None: if plugins_dir is None:
return nullcontext() return nullcontext()

View File

@ -84,7 +84,7 @@ setup(
'httpie = httpie.manager.__main__:main', 'httpie = httpie.manager.__main__:main',
], ],
}, },
python_requires='>=3.6', python_requires='>=3.7',
extras_require=extras_require, extras_require=extras_require,
install_requires=install_requires, install_requires=install_requires,
classifiers=[ classifiers=[