File python-buildpack.spec of Package python-buildpack-1.6.31.1
#
# spec file for the python buildpack
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugzilla.suse.com/
#
%define upstream_version 1.6.31
Name: python-buildpack
Version: 1.6.31.1
Release: 1
Summary: Cloud Foundry buildpack for python
License: Apache-2.0
Group: Cloud/Platform/scf
Url: https://github.com/SUSE/cf-python-buildpack
Source0: https://github.com/SUSE/cf-python-buildpack/archive/v%{version}.tar.gz
BuildRequires: go
BuildRequires: go-buildpack-packager
BuildRequires: libffi-3.2.1
BuildRequires: libmemcache-1.0.18
BuildRequires: pip-9.0.3
BuildRequires: pip-pop-0.1.3
BuildRequires: pipenv-2018.11.26
BuildRequires: python-2.7.15
BuildRequires: python-2.7.16
BuildRequires: python-3.4.9
BuildRequires: python-3.4.10
BuildRequires: python-3.5.6
BuildRequires: python-3.5.7
BuildRequires: python-3.6.7
BuildRequires: python-3.6.8
BuildRequires: setuptools-41.0.0
BuildRequires: python-3.7.2
BuildRequires: python-3.7.3
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define otherdir %{_topdir}/OTHER
%description
%prep
%setup -q -n cf-%{name}-%{upstream_version}
%build
source ./.envrc
# Starting with Go 1.11 modules
if [ -f go.mod ] && [ ! -f "vendor/modules.txt" ]; then
# With go modules, we are building up the vendor/ folder before landing in obs
# both for the buildpack-packager and also for the buildpack itself.
VENDOR_GOPATH=%{_builddir}/go
export GO111MODULE=off # Disable new behavior, needs network access
rm -rf go.mod buildpack-packager.go
export GOPATH=$VENDOR_GOPATH:$GOPATH
mkdir -p $VENDOR_GOPATH/src/
mv vendor/* $VENDOR_GOPATH/src/
mkdir -p $VENDOR_GOPATH/src/github.com/cloudfoundry/python-buildpack
cp -rf src/ $VENDOR_GOPATH/src/github.com/cloudfoundry/python-buildpack
fi
buildpack-packager build -any-stack
%install
CHECKSUM=`sha1sum *buildpack-v%{version}.zip | cut -d' ' -f1`
mv *buildpack-v%{version}.zip %{otherdir}/python-buildpack-v%{version}-%{release}-pre-${CHECKSUM:0:8}.zip
%post
%postun
%files
%defattr(-,root,root)
%changelog