Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added instructions on how to upload to PyPi #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .pypirc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[testpypi]
username=bhavek
100 changes: 100 additions & 0 deletions Bold_Composer_Version_Manager.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Metadata-Version: 2.1
Name: Bold-Composer-Version-Manager
Version: 1.0.6
Summary: UNKNOWN
Home-page: https://github.com/composer-version-manager/cvm
License: MIT
Description: # Composer Version Manager

[Composer 2](https://getcomposer.org/upgrade/UPGRADE-2.0.md) is here. It's time for a one stop shop for switching between major (and minor
👶) composer versions. Erase "using the right composer version" from your workflow.

> But wait, what about `composer self-update --1` and `--2`?

Well I'm glad you've asked!

There are some added benefits this CLI and shell hook will bring to you:

1. Cached `composer.phar` for faster version toggling.
1. Per-directory smart composer environments. It's as simple as `cd my-project` and the right composer version will be used.

## Installation

Choose one of the options below to install cvm.

### Homebrew (MacOS)

```bash
brew update
brew install composer-version-manager/cvm/cvm
```

**Note:** Watch for symlink errors. If you already have an existing `Python3` installation you may be required to run the following command:

```bash
brew link --overwrite cvm
```

### Chocolatey (Windows)

*TODO*

### Download binary and update PATH

*TODO*

## Hook onto your shell

Hooking onto your shell enables cvm [Smart usage](#smart-usage) for per-directory automated composer verrsioning.

Find the instructions for your shell below. If your shell is not listed please feel free to [submit a feature request](https://github.com/composer-version-manager/cvm/issues/new) issue and we will try and make it happen.

### **BASH**

Add the following line to the end of your `~/.bashrc`

```bash
eval "$(cvm hook bash)"
```

### **ZSH**

Add the following line to the end of your `~/.zshrc`

```bash
eval "$(cvm hook zsh)"
```

## Smart usage

Create a `.cvm_config` in any directory specifying the composer version you would like to use. Navigating to that directory or any nested directory will automatically enable that composer version in your current workspace.

```bash
cd my-project
echo '2.0.11' > .cvm_config
```

This file can be committed to your source control.

## Global composer version

You can configure a global composer version. Which will be the default when no parent directory has a `.cvm_config`.

```
cvm list # List available tags
cvm use 2.0.11 # Globally use a specific composer version
```

## Authors

### Morgan Wowk

Morgan is a Software Developer from the wintery lands of Canada 🇨🇦🍁. You can primarily find him on [LinkedIn](https://www.linkedin.com/in/morganwowk/), writing open source or building apps to help [tens of thousands of ecommerce stores](https://boldcommerce.com/).

### Bhavek Budhia

Likewise, Bhavek resides in the frosty country of Canada ☃️. An avid developer 👨‍💻 with fortified experience in Python that has helped us develop a clean and extendable codebase.

Platform: UNKNOWN
Requires-Python: >=3
Description-Content-Type: text/markdown
33 changes: 33 additions & 0 deletions Bold_Composer_Version_Manager.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
README.md
setup.cfg
setup.py
Bold_Composer_Version_Manager.egg-info/PKG-INFO
Bold_Composer_Version_Manager.egg-info/SOURCES.txt
Bold_Composer_Version_Manager.egg-info/dependency_links.txt
Bold_Composer_Version_Manager.egg-info/entry_points.txt
Bold_Composer_Version_Manager.egg-info/requires.txt
Bold_Composer_Version_Manager.egg-info/top_level.txt
cvm/__init__.py
cvm/cli.py
cvm/commands.bkup.py
cvm/commands/__init__.py
cvm/commands/cache_command.py
cvm/commands/command.py
cvm/commands/hook_command.py
cvm/commands/list_command.py
cvm/commands/scan_command.py
cvm/commands/use_command.py
cvm/helpers/__init__.py
cvm/helpers/cli.py
cvm/helpers/fs.py
cvm/services/__init__.py
cvm/services/application_service.py
cvm/services/cache_service.py
cvm/services/composer_service.py
cvm/services/config_service.py
cvm/services/github_service.py
cvm/services/shell_service.py
cvm/shells/__init__.py
cvm/shells/shell.py
cvm/shells/shell_bash.py
cvm/shells/shell_zsh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 3 additions & 0 deletions Bold_Composer_Version_Manager.egg-info/entry_points.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[console_scripts]
cvm = cvm.cli:main

13 changes: 13 additions & 0 deletions Bold_Composer_Version_Manager.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ansicolors==1.1.8
argparse-color-formatter==1.2.2.post2
certifi==2020.12.5
chardet==4.0.0
colorama==0.4.4
idna==2.10
mypy==0.790
mypy-extensions==0.4.3
requests==2.25.1
six==1.15.0
typed-ast==1.4.2
typing-extensions==3.7.4.3
urllib3==1.26.2
1 change: 1 addition & 0 deletions Bold_Composer_Version_Manager.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cvm
34 changes: 34 additions & 0 deletions docs/upload-to-pypi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Table of contents

* [Table of contents](#table-of-contents)
* [Pre-req](#pre-req)
* [Upload process](#upload-process)

## Pre-req

* Register an account with (pypi.org)[https://pypi.org]
* Register an account with (Test Pypi)[https://test.pypi.org]
* Install twine with `pip install twine`

## Upload process

* Build your release candidate with:

```bash
python setup.py sdist bdist_wheel
```

* Using a test repository

```bash
twine upload --repository testpypi dist/*
```

will upload to `https://test.pypi.org/project/<sampleproject>`

* Upload the package with

```bash
twine check dist/* # Check for errors/warnings
twine upload dist/*
```
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Inside of setup.cfg
[metadata]
description-file = README.md

15 changes: 13 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
from setuptools import setup, find_packages
import pathlib


requirements_data = pathlib.Path('.', 'requirements.txt').read_text().split('\n')
readme = pathlib.Path('.', 'README.md').read_text()

setup(
name='Composer Version Manager',
name='composer version manager',
packages=find_packages(),
version='1.0.7',
license='MIT',
long_description=readme,
long_description_content_type="text/markdown",
url = 'https://github.com/composer-version-manager/cvm',
entry_points={
'console_scripts': [
'cvm=cvm.cli:main',
],
},
python_requires='>=3'
install_requires = requirements_data,
python_requires='>=3',
)