---
title: "Packaging and Publishing"  
description: "Packaging and Publishing"  
author: "Anonymous User"  
published: 2018-07-13  
updated: 2018-07-13  
canonical: https://www.mindstick.com/forum/34614/packaging-and-publishing  
category: "python"  
tags: ["python"]  
reading_time: 2 minutes  

---

# Packaging and Publishing

How to implement Packaging and [Publishing](https://www.mindstick.com/blog/11827/self-publishing-variety) in [Python](https://www.mindstick.com/articles/75378/simple-yet-useful-tips-when-using-python) ?

## Replies

### Reply by Prakash nidhi Verma

Packaging and Publishing Python code :

```
pip install package_name  
```

Get the python scripts ready :

```
locator.py 
```

Getting the package-directory structure ready :

```
setup.py 
```

```
pip install setuptools 
```

```
from setuptools import setup  
# reading long description from file with open('DESCRIPTION.txt') as file:
    long_description = file.read()
# specify requirements of your package here
REQUIREMENTS = ['requests']
# some more details
CLASSIFIERS = [
    'Development Status :: 4 - Beta',
    'Intended Audience :: Developers',
    'Topic :: Internet',
    'License :: OSI Approved :: MIT License'
    'Programming Language :: Python :: 3.5',
    ]
# calling the setup function
setup(name='mygmap',
      version='1.0.0',
      description='A small wrapper around google maps api',
      long_description=long_description,
      url='https://github.com/prakashnidhiverma/mygmap',
      author='Nikhil Kumar Singh',
      author_email='pnv@mindstick.com.com',
      license='MIT',
      packages=['geo'],
      classifiers=CLASSIFIERS,
      install_requires=REQUIREMENTS,
      keywords='maps location address'
      )
```

different arguments of setup function do:

-name

-version

-description

-long_description

-url

-author, author_email

-license

-classifiers

-install_requires

-keywords

```
__init__.py
```

Upload the package:

```
python setup.py register -r pypitest 
```

```
python setup.py sdist upload -r pypitest 
```

```
python setup.py register -r pypi 
```

```
python setup.py sdist upload -r pypi 
```

```
pip install your_package_name 
```


---

Original Source: https://www.mindstick.com/forum/34614/packaging-and-publishing

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
