Skip to content

jfrog/frogbot_pipenv_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pipenv Example

Overview

This example demonstrates how to build a Python Pipenv project with Artifactory, while collecting build-info.

Before Running the Example

Set Up the Environment

  1. Make sure Python is installed and the python command is in your PATH.
  2. Install pipenv. You can use the Pip Documentation and also Installing packages using pip and virtual environments
  3. Create three Pypi repositories in Artifactory - a local, remote and a virtual repository. You can use the PyPi Repositories Documentation.
  • The remote repository should proxy https://files.pythonhosted.org (the default when creating a Pypi remote repository).
  • Name the virtual repository pypi.
  • The virtual repository should include the remote repository.
  • The virtual repository should have the local repository set as the Default Deployment Repository.
  1. Make sure wheel and setuptools are installed. You can use the Installing Packages Documentation.
  2. Make sure version 2.9.0 or above of JFrog CLI is installed.

Validate the Setup

In your terminal, validate that the following commands work.

Output Python version:
> python --version

Output pipenv version:
> pipenv --version

Output JFrog CLI version:
> jf --version

Running the Example

'cd' to the root project directory

Configure Artifactory:
> jf c add

Configure the project's resolution repository. You shoud set the virtual repository you created.
> jf pipenv-config --repo-resolve=<PYPI_REPO> [credentials flags]

Install project dependencies with pipenv from Artifactory:
> jf pipenv install --build-name=my-pipenv-build --build-number=1 --module=jfrog-pipenv-example

Package the project, create distribution archives (tar.gz and whl):
> python setup.py sdist bdist_wheel

Upload the packages to the pypi repository in Artifactory:
> jf rt u dist/ pypi/ --build-name=my-pipenv-build --build-number=1 --module=jfrog-pipenv-example

Collect environment variables and add them to the build info:
> jf rt bce my-pipenv-build 1

Publish the build info to Artifactory:
> jf rt bp my-pipenv-build 1

Install published package by installing it from Artifactory using pip:
> jf pipenv install jfrog-pipenv-example

Learn about [Building Python Packages with JFrog CLI](https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-BuildingPythonPackages).

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages