Giter Site home page Giter Site logo

poetry-gcp-pypi's Introduction

poetry-gcp-pypi

poetry gcp pypi

gcloud auth login

pip install keyrings.google-artifactregistry-auth

pip install poetry==1.2.0a2

bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ gcloud auth login
bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ pip install keyrings.google-artifactregistry-auth
bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ pip install poetry==1.2.0a2
bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $
bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ poetry init

This command will guide you through creating your pyproject.toml config.

Package name [poetry-gcp-pypi]:  my-sample-project
Version [0.1.0]:
Description []:  
Author [bharath <[email protected]>, n to skip]:  
License []:  
Compatible Python versions [^3.9]:  

Would you like to define your main dependencies interactively? (yes/no) [yes] no
Would you like to define your development dependencies interactively? (yes/no) [yes] no
Generated file

[tool.poetry]
name = "my-sample-project"
version = "0.1.0"
description = ""
authors = ["bharath <[email protected]>"]
readme = "README.md"
packages = [{include = "my_sample_project"}]

[tool.poetry.dependencies]
python = "^3.9"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


Do you confirm generation? (yes/no) [yes]  
bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ poetry --version
Poetry (version 1.2.0a2)
bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) 

bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ poetry config repositories.google https://asia-southeast1-python.pkg.dev/srianjaneyam/test-repo
bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ mkdir my_sample_project
bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ 

bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ touch my_sample_project/__init__.py
bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ touch README.md
bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ poetry publish --build -r google
Creating virtualenv my-sample-project-xIvPYfgY-py3.9 in /Users/bharathdasaraju/Library/Caches/pypoetry/virtualenvs
Building my-sample-project (0.1.0)
  - Building sdist
  - Built my-sample-project-0.1.0.tar.gz
  - Building wheel
  - Built my_sample_project-0.1.0-py3-none-any.whl

Publishing my-sample-project (0.1.0) to google
 - Uploading my-sample-project-0.1.0.tar.gz 100%
 - Uploading my_sample_project-0.1.0-py3-none-any.whl 100%
bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ 

gcp_pypi_repo

use uploaded package in second_project

bharathdasaraju@MacBook-Pro poetry-gcp-pypi (main) $ cd second_project/

bharathdasaraju@MacBook-Pro second_project (main) $ cat pyproject.toml 
[tool.poetry]
name = "secondary-project"
version = "0.1.0"
description = ""
authors = ["bharath <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9"
my-sample-project = "^0.1.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[[tool.poetry.source]]
name = "google"
url = "https://asia-southeast1-python.pkg.dev/srianjaneyam/test-repo/simple"
bharathdasaraju@MacBook-Pro second_project (main) $


bharathdasaraju@MacBook-Pro second_project (main) $ poetry add my-sample-project
Creating virtualenv secondary-project-uIi-1zLL-py3.9 in /Users/bharathdasaraju/Library/Caches/pypoetry/virtualenvs
Using version ^0.1.0 for my-sample-project

Updating dependencies
Resolving dependencies... (1.1s)

Writing lock file

Package operations: 1 install, 0 updates, 0 removals

  • Installing my-sample-project (0.1.0)
bharathdasaraju@MacBook-Pro second_project (main) $ 

poetry-gcp-pypi's People

Contributors

bharathkumarraju avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.