Skip to content

Commit b0547bb

Browse files
committed
Added instructions on how to upload to PyPi
* Added a docs/upload-to-pypi.md file * Added the setup.cfg file * Updated setup.py: Added version, license and url meta information
1 parent fb85dd6 commit b0547bb

File tree

10 files changed

+204
-2
lines changed

10 files changed

+204
-2
lines changed

.pypirc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[testpypi]
2+
username=bhavek
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
Metadata-Version: 2.1
2+
Name: Bold-Composer-Version-Manager
3+
Version: 1.0.6
4+
Summary: UNKNOWN
5+
Home-page: https://github.com/composer-version-manager/cvm
6+
License: MIT
7+
Description: # Composer Version Manager
8+
9+
[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
10+
👶) composer versions. Erase "using the right composer version" from your workflow.
11+
12+
> But wait, what about `composer self-update --1` and `--2`?
13+
14+
Well I'm glad you've asked!
15+
16+
There are some added benefits this CLI and shell hook will bring to you:
17+
18+
1. Cached `composer.phar` for faster version toggling.
19+
1. Per-directory smart composer environments. It's as simple as `cd my-project` and the right composer version will be used.
20+
21+
## Installation
22+
23+
Choose one of the options below to install cvm.
24+
25+
### Homebrew (MacOS)
26+
27+
```bash
28+
brew update
29+
brew install composer-version-manager/cvm/cvm
30+
```
31+
32+
**Note:** Watch for symlink errors. If you already have an existing `Python3` installation you may be required to run the following command:
33+
34+
```bash
35+
brew link --overwrite cvm
36+
```
37+
38+
### Chocolatey (Windows)
39+
40+
*TODO*
41+
42+
### Download binary and update PATH
43+
44+
*TODO*
45+
46+
## Hook onto your shell
47+
48+
Hooking onto your shell enables cvm [Smart usage](#smart-usage) for per-directory automated composer verrsioning.
49+
50+
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.
51+
52+
### **BASH**
53+
54+
Add the following line to the end of your `~/.bashrc`
55+
56+
```bash
57+
eval "$(cvm hook bash)"
58+
```
59+
60+
### **ZSH**
61+
62+
Add the following line to the end of your `~/.zshrc`
63+
64+
```bash
65+
eval "$(cvm hook zsh)"
66+
```
67+
68+
## Smart usage
69+
70+
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.
71+
72+
```bash
73+
cd my-project
74+
echo '2.0.11' > .cvm_config
75+
```
76+
77+
This file can be committed to your source control.
78+
79+
## Global composer version
80+
81+
You can configure a global composer version. Which will be the default when no parent directory has a `.cvm_config`.
82+
83+
```
84+
cvm list # List available tags
85+
cvm use 2.0.11 # Globally use a specific composer version
86+
```
87+
88+
## Authors
89+
90+
### Morgan Wowk
91+
92+
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/).
93+
94+
### Bhavek Budhia
95+
96+
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.
97+
98+
Platform: UNKNOWN
99+
Requires-Python: >=3
100+
Description-Content-Type: text/markdown
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
README.md
2+
setup.cfg
3+
setup.py
4+
Bold_Composer_Version_Manager.egg-info/PKG-INFO
5+
Bold_Composer_Version_Manager.egg-info/SOURCES.txt
6+
Bold_Composer_Version_Manager.egg-info/dependency_links.txt
7+
Bold_Composer_Version_Manager.egg-info/entry_points.txt
8+
Bold_Composer_Version_Manager.egg-info/requires.txt
9+
Bold_Composer_Version_Manager.egg-info/top_level.txt
10+
cvm/__init__.py
11+
cvm/cli.py
12+
cvm/commands.bkup.py
13+
cvm/commands/__init__.py
14+
cvm/commands/cache_command.py
15+
cvm/commands/command.py
16+
cvm/commands/hook_command.py
17+
cvm/commands/list_command.py
18+
cvm/commands/scan_command.py
19+
cvm/commands/use_command.py
20+
cvm/helpers/__init__.py
21+
cvm/helpers/cli.py
22+
cvm/helpers/fs.py
23+
cvm/services/__init__.py
24+
cvm/services/application_service.py
25+
cvm/services/cache_service.py
26+
cvm/services/composer_service.py
27+
cvm/services/config_service.py
28+
cvm/services/github_service.py
29+
cvm/services/shell_service.py
30+
cvm/shells/__init__.py
31+
cvm/shells/shell.py
32+
cvm/shells/shell_bash.py
33+
cvm/shells/shell_zsh.py
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[console_scripts]
2+
cvm = cvm.cli:main
3+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ansicolors==1.1.8
2+
argparse-color-formatter==1.2.2.post2
3+
certifi==2020.12.5
4+
chardet==4.0.0
5+
colorama==0.4.4
6+
idna==2.10
7+
mypy==0.790
8+
mypy-extensions==0.4.3
9+
requests==2.25.1
10+
six==1.15.0
11+
typed-ast==1.4.2
12+
typing-extensions==3.7.4.3
13+
urllib3==1.26.2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cvm

docs/upload-to-pypi.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Table of contents
2+
3+
* [Table of contents](#table-of-contents)
4+
* [Pre-req](#pre-req)
5+
* [Upload process](#upload-process)
6+
7+
## Pre-req
8+
9+
* Register an account with (pypi.org)[https://pypi.org]
10+
* Register an account with (Test Pypi)[https://test.pypi.org]
11+
* Install twine with `pip install twine`
12+
13+
## Upload process
14+
15+
* Build your release candidate with:
16+
17+
```bash
18+
python setup.py sdist bdist_wheel
19+
```
20+
21+
* Using a test repository
22+
23+
```bash
24+
twine upload --repository testpypi dist/*
25+
```
26+
27+
will upload to `https://test.pypi.org/project/<sampleproject>`
28+
29+
* Upload the package with
30+
31+
```bash
32+
twine check dist/* # Check for errors/warnings
33+
twine upload dist/*
34+
```

setup.cfg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Inside of setup.cfg
2+
[metadata]
3+
description-file = README.md
4+

setup.py

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
from setuptools import setup, find_packages
2+
import pathlib
3+
4+
5+
requirements_data = pathlib.Path('.', 'requirements.txt').read_text().split('\n')
6+
readme = pathlib.Path('.', 'README.md').read_text()
27

38
setup(
4-
name='Composer Version Manager',
9+
name='composer version manager',
510
packages=find_packages(),
11+
version='1.0.7',
12+
license='MIT',
13+
long_description=readme,
14+
long_description_content_type="text/markdown",
15+
url = 'https://github.com/composer-version-manager/cvm',
616
entry_points={
717
'console_scripts': [
818
'cvm=cvm.cli:main',
919
],
1020
},
11-
python_requires='>=3'
21+
install_requires = requirements_data,
22+
python_requires='>=3',
1223
)

0 commit comments

Comments
 (0)