---
# System prepended metadata

title: Make your own package

---

Make your own package 
=====================

[toc]

## Create a Github package
- Create a new repository in Github and add a ".gitignore" and "LICENSE" file
    ![](https://i.imgur.com/D5MVljN.png)
- It will look like this
    ![](https://i.imgur.com/aQ7fPBT.png)
- Download the repository by "git clone" method
    `git clone https://github.com/Jitesh17/jpython.git`
    ![](https://i.imgur.com/uUlbS2B.png)
- Create *setup.py* file as shown below
    



    ```python=
    from setuptools import setup, find_packages

    packages = find_packages(
        where='.', 
        include=['pyjeasy*']
    )

    with open("README.md", "r") as fh:
        long_description = fh.read()

    setup(
        name= "pyjeasy",
        version="0.0.1",
        author="Jitesh Gosar",
        author_email="gosar95@gmail.com",
        description="Useful python tools",
        long_description=long_description,
        long_description_content_type="text/markdown",
        url="https://github.com/Jitesh17/pyjeasy",
        py_modules=["pyjeasy"],
        packages=packages,
        classifiers=[
            "Programming Language :: Python :: 3",
            "Programming Language :: Python :: 3.5",
            "Programming Language :: Python :: 3.6",
            "Programming Language :: Python :: 3.7",
            "License :: OSI Approved :: MIT License",
            "Operating System :: OS Independent",
        ],
        install_requires=[

        ],
        python_requires='>=3.6',
    )
    ```
- Edit, commit and push the changes to github
    ![](https://i.imgur.com/28OFsij.png)


## Upload to pypi
- Add *buildpackage.sh* to easily build your package
    ```python= 
    python setup.py sdist bdist_wheel
    ```
    ![](https://i.imgur.com/pXey1tH.png)
- Run 
    `./build_package.sh`
- Install twine: 
    `pip install twine`
- Run 
    `twine upload dist/*`
    - Enter your pypi username and password when asked.python=
    ```sh
    Uploading distributions to https://upload.pypi.org/legacy/
    Enter your username: 
    Enter your password: 
    ```
    ![](https://i.imgur.com/mGVa6jq.png)


## Upload to Apt

[Ref](https://earthly.dev/blog/creating-and-hosting-your-own-deb-packages-and-apt-repo/)