diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c6cf6d37..c7116b9a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ All pull request authors must have a Contributor License Agreement (CLA) on-file with us. Please sign the Contributor License Agreements for Cloud Foundry ([Individual or Corporate](https://www.cloudfoundry.org/community/cla/)) via the EasyCLA application when you submit your first Pull Request. -When sending signed CLA please provide your github username in case of individual CLA or the list of github usernames that can make pull requests on behalf of your organization. +When sending signed CLA please provide your Github username in case of individual CLA or the list of Github usernames that can make pull requests on behalf of your organization. If you are confident that you're covered under a Corporate CLA, please make sure you've publicized your membership in the appropriate Github Org, per these instructions. diff --git a/README.md b/README.md index 897a55ab..3b3d1c67 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,20 @@ This buildpack supports running Django and Flask apps. Official buildpack documentation can be found at [python buildpack docs](http://docs.cloudfoundry.org/buildpacks/python/index.html). +## Adding new dependencies + +If you want to add a new dependency to the buildpack, please add it to the [config.yml](https://github.com/ZPascal/buildpacks-ci/blob/81d4f7942a9e4f01196ab654b6a5f89681015d41/pipelines/dependency-builds/config.yml#L272) file. For example, if you want to add a new version of Python, add an entry like the following: + +```yaml +python: + lines: + - line: 3.14.X + deprecation_date: 2030-10-07 + link: https://peps.python.org/pep-0745/ +``` + +The new dependency will be automatically added to the buildpack [manifest.yml](manifest.yml) file. + ### Building the Buildpack To build this buildpack, run the following commands from the buildpack's directory: @@ -24,7 +38,7 @@ To build this buildpack, run the following commands from the buildpack's directo 1. Install buildpack-packager ```bash - go install github.com/cloudfoundry/libbuildpack/packager/buildpack-packager + go install github.com/cloudfoundry/libbuildpack/packager/buildpack-packager@latest ``` 1. Build the buildpack diff --git a/src/python/supply/supply.go b/src/python/supply/supply.go index b36a48fd..32b513c4 100644 --- a/src/python/supply/supply.go +++ b/src/python/supply/supply.go @@ -743,7 +743,7 @@ func (s *Supplier) RunPipVendored() error { // dependencies - wheel and setuptools. These are packaged by the dependency // pipeline within the "pip" dependency. func (s *Supplier) InstallCommonBuildDependencies() error { - var commonDeps = []string{"wheel", "setuptools"} + var commonDeps = []string{"wheel", "setuptools", "flit-core"} tempPath := filepath.Join("/tmp", "common_build_deps") if err := s.Installer.InstallOnlyVersion("pip", tempPath); err != nil { return err diff --git a/src/python/supply/supply_test.go b/src/python/supply/supply_test.go index b7947dc3..9b37a64c 100644 --- a/src/python/supply/supply_test.go +++ b/src/python/supply/supply_test.go @@ -633,10 +633,11 @@ MarkupSafe==2.0.1 Describe("InstallCommonBuildDependencies", func() { Context("successful installation", func() { - It("runs command to install wheel and setuptools", func() { + It("runs command to install wheel, setuptools and flit-core", func() { mockInstaller.EXPECT().InstallOnlyVersion("pip", "/tmp/common_build_deps") mockCommand.EXPECT().Execute(buildDir, gomock.Any(), gomock.Any(), "python", "-m", "pip", "install", "wheel", "--no-index", "--upgrade-strategy=only-if-needed", "--find-links=/tmp/common_build_deps") mockCommand.EXPECT().Execute(buildDir, gomock.Any(), gomock.Any(), "python", "-m", "pip", "install", "setuptools", "--no-index", "--upgrade-strategy=only-if-needed", "--find-links=/tmp/common_build_deps") + mockCommand.EXPECT().Execute(buildDir, gomock.Any(), gomock.Any(), "python", "-m", "pip", "install", "flit-core", "--no-index", "--upgrade-strategy=only-if-needed", "--find-links=/tmp/common_build_deps") Expect(supplier.InstallCommonBuildDependencies()).To(Succeed()) })