{ "info": { "author": "Hai V.Dam", "author_email": "haidv@tomochain.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "## My test package \ud83d\ude01\ud83d\ude01\ud83d\ude01\n\n### STEP to upload your package\n\n#### 1. Install the required packages:\n\n- `Setuptools`: Setuptools is a package development process library designed for creating and distributing Python packages.\n- `Wheel`: The Wheel package provides a bdist_wheel command for setuptools. It creates .whl file which is directly installable through the pip install command. We'll then upload the same file to pypi.org.\n- `Twine`: The Twine package provides a secure, authenticated, and verified connection between your system and PyPi over HTTPS.\n- `Tqdm`: This is a smart progress meter used internally by Twine.\n\n```\nsudo python -m pip install --upgrade pip setuptools wheel\nsudo python -m pip install tqdm\nsudo python -m pip install --user --upgrade twine\n```\n\n#### 2. Setup project\n\n- Create folder structure follow this repo\n- Package file sample `dokg`\n\n```\n#!/usr/bin/env python\necho \"hey there, this is my first pip package\"\n```\n\n- Make script excecutable:\n `chmod +x dokr`\n\n- Create a setup file setup.py in your package. This file will contain all your package metadata information. \n\n```\nimport setuptools\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\n\nsetuptools.setup(\n name = 'dokg',\n version = '0.3',\n scripts = ['dokg'],\n author = 'Hai V.Dam',\n author_email = 'haidv@tomochain.com',\n description = 'My test package',\n long_description = long_description,\n long_description_content_type = \"text/markdown\",\n url = 'https://github.com/naviat/dokg',\n packages = setuptools.find_packages(),\n classifiers = [\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 2\",\n \"License :: OSI Approved :: MIT License\",\n \"Operating System :: OS Independent\",\n ],\n)\n```\n\n#### 3. Compiling Your Package\n\nGo into your package folder and execute this command: `python setup.py bdist_wheel`. This will create a structure like this:\n\n```\n.\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 build\n\u2502 \u251c\u2500\u2500 bdist.macosx-10.7-x86_64\n\u2502 \u2514\u2500\u2500 scripts-3.7\n\u2502 \u2514\u2500\u2500 dokg\n\u251c\u2500\u2500 dist\n\u2502 \u2514\u2500\u2500 dokg-0.3-py3-none-any.whl\n\u251c\u2500\u2500 dokg\n\u251c\u2500\u2500 dokg.egg-info\n\u2502 \u251c\u2500\u2500 PKG-INFO\n\u2502 \u251c\u2500\u2500 SOURCES.txt\n\u2502 \u251c\u2500\u2500 dependency_links.txt\n\u2502 \u2514\u2500\u2500 top_level.txt\n\u2514\u2500\u2500 setup.py\n```\n\n- `build`: build package information.\n\n- `dist`: Contains your .whl file. A WHL file is a package saved in the Wheel format, which is the standard built-package format used for Python distributions. You can directly install a .whl file using pip install some_package.whl on your system\n\n- `project.egg.info`: An egg package contains compiled bytecode, package information, dependency links, and captures the info used by the setup.py test command when running tests.\n\n#### 4. Upload on pip\n\n- Create pypirc: The Pypirc file stores the PyPi repository information. Create a file in the home directory\n\nfor Windows : `C:\\Users\\UserName\\.pypirc`\n\nfor *nix : `~/.pypirc`\n\nAnd add the following content to it. Replace javatechy with your username. \ud83d\ude1d\ud83d\ude1d\ud83d\ude1d \n\n```\n[distutils] \nindex-servers=pypi\n[pypi] \nrepository = https://upload.pypi.org/legacy/ \nusername = naviat\n```\n\nTo upload your dist/*.whl file on PyPi, use Twine:\n\n`python -m twine upload dist/*`\n\n\n### NOTE: When upgrade your package => delete all file in `dist` folder before run the command above \n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/naviat/dokg", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "dokg", "package_url": "https://pypi.org/project/dokg/", "platform": "", "project_url": "https://pypi.org/project/dokg/", "project_urls": { "Homepage": "https://github.com/naviat/dokg" }, "release_url": "https://pypi.org/project/dokg/0.4/", "requires_dist": null, "requires_python": "", "summary": "My test package", "version": "0.4" }, "last_serial": 4808710, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "6593504c1ec62d60ad758c54365db404", "sha256": "dca5acd0dcc1c1ea93681248c6e66a26b0d0a8be406305d3ddcb51d252ef6e97" }, "downloads": -1, "filename": "dokg-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6593504c1ec62d60ad758c54365db404", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2133, "upload_time": "2019-02-11T09:31:37", "url": "https://files.pythonhosted.org/packages/69/8c/a590781d450f29812e58096c02fe2df8d762e2c0a57c640ef9c7490a8bc3/dokg-0.1-py3-none-any.whl" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "3d391a2bf7faf7c9b3672eb2705aff64", "sha256": "75cc89ed61957839d083fab1ba68abb4abf82d649a1b1845b78c681688a4eb99" }, "downloads": -1, "filename": "dokg-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "3d391a2bf7faf7c9b3672eb2705aff64", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2143, "upload_time": "2019-02-11T10:02:51", "url": "https://files.pythonhosted.org/packages/db/66/563179b86cb9de5e52fa811d372ffd08e53ca7faca7b20cd76fc4ef65d66/dokg-0.3-py3-none-any.whl" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "32644b9f7540be3809eb85ab216efa9f", "sha256": "95a2d694c0ac5509a3eef68d4bc8a1280bf7e98080da38e921e78b7162b0137e" }, "downloads": -1, "filename": "dokg-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "32644b9f7540be3809eb85ab216efa9f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3554, "upload_time": "2019-02-12T01:51:24", "url": "https://files.pythonhosted.org/packages/0d/53/9707e3703c0323556d48e00d48e814a009a30516bf4c7ba945be6d8da94e/dokg-0.4-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "32644b9f7540be3809eb85ab216efa9f", "sha256": "95a2d694c0ac5509a3eef68d4bc8a1280bf7e98080da38e921e78b7162b0137e" }, "downloads": -1, "filename": "dokg-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "32644b9f7540be3809eb85ab216efa9f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3554, "upload_time": "2019-02-12T01:51:24", "url": "https://files.pythonhosted.org/packages/0d/53/9707e3703c0323556d48e00d48e814a009a30516bf4c7ba945be6d8da94e/dokg-0.4-py3-none-any.whl" } ] }