A memo created in a package and registered in PyPI

Work memo when creating a package with Python and registering it in PyPI In addition, this time I made a command line tool

By registering with PyPI, you will be able to install with pip

Directory structure

├── README.md 
├── requirements.txt
├── setup.py
└── src
    ├── __init__.py
    └── hoge.py

File details

An empty file created with touch

For github

Source code of the implemented package Since this is a command line tool, I have described the process to be executed in the main function.

Enter the information required when registering the package

```Py:setup.py
# -*- encoding:utf-8 -*-
from setuptools import setup, find_packages

setup(
	name='pass-manager',
    version='1.0.0',
    author='petitviolet',
    author_email='[email protected]',
    packages=find_packages(),
    install_requires=[],
    description = 'CLI tool',
    long_description = 'Simple CLI tool',
	url = 'https://example.com/',
    license = 'MIT',
	# scripts = ['src/hoge.py'],
    platforms = ['Mac OS X'],
	# platforms = ['POSIX', 'Windows', 'Mac OS X'],
	entry_points={
   	 	'console_scripts': 'hoge = src.hoge:main'
    },
	zip_safe=False,
    classifiers=[
	      'Environment :: Console',
          'Intended Audience :: Developers',
	      'Operating System :: OS Independent',
          'Programming Language :: Python',
	      'Topic :: Utilities'
    ]
)
```

Enter classfiers and license by looking at [https://pypi.python.org/pypi?:action=list_classifiers](https://pypi.python.org/pypi ?:action=list_classifiers). I think.

Registration work

# setup.Check py
$ python setup.py check
# -> "running check"Is output
$ python setup.py register
running register
...
We need to know who you are, so please choose either:
1. use your existing login,
2. register as a new user,
3. have the server generate a new password for you (and email it to you), or
4. quit
Your selection [default 1]:

Now select 2 and register your username and password The user account is actually created In addition, password will get angry if it is not strong enough

python setup.py register sdist bdist bdist_egg upload

You can now upload the source, binaries and eggs to PyPI.

You will be able to access the uploaded package at http://pypi.python.org/pypi/ "PKG-NAME" Package information (contents described in setup.py) can also be edited from the PyPI package page.

Recommended Posts

A memo created in a package and registered in PyPI
Publish / upload a library created in Python to PyPI
I created a class in Python and tried duck typing
Register as a package on PyPI
Created a package to support AWS Lambda development in Go language
[For beginners] How to register a library created in Python in PyPI
A memo with Python2.7 and Python3 on CentOS
Semi-automatically generate a description of the package to be registered on PyPI
I created a password tool in Python.
I registered PyQCheck, a library that can perform QuickCheck with Python, in PyPI.
Organize python modules and packages in a mess
Receives and processes n objects in a list
Summary of OSS tools and libraries created in 2016
A memo that I wrote a quicksort in Python
Open a ZIP created on Windows in Linux
I wrote a class in Python3 and Java
A memo about writing merge sort in Python
[Memo] I tried a pivot table in Python
Create a package containing global commands in Python
Load a package created locally with Go Module
Created a Python library to write complex comprehensions and reduce in an easy-to-read manner
Causes and solutions when python sam build fails in a newly created Cloud9 environment
I created a stacked bar graph with matplotlib in Python and added a data label
The simplest Python memo in Japan (classes and objects)
I want to find a popular package on PyPi
[Python] Created a method to convert radix in 1 second
Output a binary dump in binary and revert to a binary file
Get a participant's username and screen name in Slack