gandos-cakep


Namegandos-cakep JSON
Version 0.0.12 PyPI version JSON
download
home_pagehttps://github.com/pypa/sampleproject
SummaryA small example package
upload_time2023-11-04 18:47:30
maintainer
docs_urlNone
authorgandos_cakep
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Make sure you have upgraded version of pip
Windows
```
py -m pip install --upgrade pip
```

Linux/MAC OS
```
python3 -m pip install --upgrade pip
```

## Create a project with the following structure
```
packaging_tutorial/
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.cfg
├── src/
│   └── example_package/
│       ├── __init__.py
│       └── example.py
└── tests/
touch LICENSE
touch pyproject.toml
touch setup.cfg
mkdir src/mypackage
touch src/mypackage/__init__.py
touch src/mypackage/main.py
mkdir tests
```

## pyproject.toml 

This file tells tools like pip and build how to create your project

```
[build-system]
requires = [
    "setuptools>=42",
    "wheel"
]
build-backend = "setuptools.build_meta"
```
build-system.requires gives a list of packages that are needed to build your package. Listing something here will only make it available during the build, not after it is installed.

build-system.build-backend is the name of Python object that will be used to perform the build. If you were to use a different build system, such as flit or poetry, those would go here, and the configuration details would be completely different than the setuptools configuration described below.


# Setup.cfg setup
Using setup.cfg is a best practice, but you could have a dynamic setup file using setup.py

```
[metadata]
name = example-pkg-YOUR-USERNAME-HERE
version = 0.0.1
author = Example Author
author_email = author@example.com
description = A small example package
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/pypa/sampleproject
project_urls =
    Bug Tracker = https://github.com/pypa/sampleproject/issues
classifiers =
    Programming Language :: Python :: 3
    License :: OSI Approved :: MIT License
    Operating System :: OS Independent

[options]
package_dir =
    = src
packages = find:
python_requires = >=3.6

[options.packages.find]
where = src

```
# Running the build
### Make sure your build tool is up to date
Windows
```
py -m pip install --upgrade build
```
Linux/MAC OS
```
python3 -m pip install --upgrade build
```


### Create the build
```
py -m build
```

### Upload to pypi
```
twine upload dist/*
```














### References
https://packaging.python.org/tutorials/packaging-projects/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pypa/sampleproject",
    "name": "gandos-cakep",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "gandos_cakep",
    "author_email": "dki.hadihermawan@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "\n# Make sure you have upgraded version of pip\nWindows\n```\npy -m pip install --upgrade pip\n```\n\nLinux/MAC OS\n```\npython3 -m pip install --upgrade pip\n```\n\n## Create a project with the following structure\n```\npackaging_tutorial/\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 pyproject.toml\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 setup.cfg\n\u251c\u2500\u2500 src/\n\u2502   \u2514\u2500\u2500 example_package/\n\u2502       \u251c\u2500\u2500 __init__.py\n\u2502       \u2514\u2500\u2500 example.py\n\u2514\u2500\u2500 tests/\ntouch LICENSE\ntouch pyproject.toml\ntouch setup.cfg\nmkdir src/mypackage\ntouch src/mypackage/__init__.py\ntouch src/mypackage/main.py\nmkdir tests\n```\n\n## pyproject.toml \n\nThis file tells tools like pip and build how to create your project\n\n```\n[build-system]\nrequires = [\n    \"setuptools>=42\",\n    \"wheel\"\n]\nbuild-backend = \"setuptools.build_meta\"\n```\nbuild-system.requires gives a list of packages that are needed to build your package. Listing something here will only make it available during the build, not after it is installed.\n\nbuild-system.build-backend is the name of Python object that will be used to perform the build. If you were to use a different build system, such as flit or poetry, those would go here, and the configuration details would be completely different than the setuptools configuration described below.\n\n\n# Setup.cfg setup\nUsing setup.cfg is a best practice, but you could have a dynamic setup file using setup.py\n\n```\n[metadata]\nname = example-pkg-YOUR-USERNAME-HERE\nversion = 0.0.1\nauthor = Example Author\nauthor_email = author@example.com\ndescription = A small example package\nlong_description = file: README.md\nlong_description_content_type = text/markdown\nurl = https://github.com/pypa/sampleproject\nproject_urls =\n    Bug Tracker = https://github.com/pypa/sampleproject/issues\nclassifiers =\n    Programming Language :: Python :: 3\n    License :: OSI Approved :: MIT License\n    Operating System :: OS Independent\n\n[options]\npackage_dir =\n    = src\npackages = find:\npython_requires = >=3.6\n\n[options.packages.find]\nwhere = src\n\n```\n# Running the build\n### Make sure your build tool is up to date\nWindows\n```\npy -m pip install --upgrade build\n```\nLinux/MAC OS\n```\npython3 -m pip install --upgrade build\n```\n\n\n### Create the build\n```\npy -m build\n```\n\n### Upload to pypi\n```\ntwine upload dist/*\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### References\nhttps://packaging.python.org/tutorials/packaging-projects/\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A small example package",
    "version": "0.0.12",
    "project_urls": {
        "Bug Tracker": "https://github.com/pypa/sampleproject/issues",
        "Homepage": "https://github.com/pypa/sampleproject"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f2d4d2d8029ed476e99550c1649e7f7ab8bc483f6c8e8e6af7fcfa05b0941ec7",
                "md5": "48c68be0a1885d0d0ac61f382ee7715a",
                "sha256": "f21d7329259ddf683852ef5677a8c1fe930e6a9805c7ca08695bf24a6e0ea11a"
            },
            "downloads": -1,
            "filename": "gandos_cakep-0.0.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48c68be0a1885d0d0ac61f382ee7715a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4564,
            "upload_time": "2023-11-04T18:47:30",
            "upload_time_iso_8601": "2023-11-04T18:47:30.016324Z",
            "url": "https://files.pythonhosted.org/packages/f2/d4/d2d8029ed476e99550c1649e7f7ab8bc483f6c8e8e6af7fcfa05b0941ec7/gandos_cakep-0.0.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-04 18:47:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pypa",
    "github_project": "sampleproject",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "gandos-cakep"
}
        
Elapsed time: 0.13578s