Skip to content

Commit f3ae3de

Browse files
committed
Merging Packages docs
1 parent 30dfacf commit f3ae3de

File tree

3 files changed

+62
-72
lines changed

3 files changed

+62
-72
lines changed

docs/12 Packages.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/3 Packages.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Packages
33
nav_order: 3
4+
has_children: true
45
---
56

67
### Explore python packages
@@ -28,4 +29,64 @@ from pybrot.Mandelbrot import Mandelbrot
2829

2930
m=Mandelbrot()
3031
m.show()
31-
```
32+
```
33+
34+
# Steps to create local python package
35+
36+
### References
37+
- [Publish your own python package](https://www.youtube.com/watch?v=tEFkHEKypLI)
38+
39+
### Prepare all files
40+
- To create python package you'll need 4 things
41+
- solution folder : This contains all python script files related to your package
42+
- setup.py : file which contain package meta data
43+
- README :
44+
- LICENSE : package license
45+
- refer this github repo : [vidstream](https://github.com/NeuralNine/vidstream)
46+
- Sample setup.py file
47+
48+
```python
49+
from setuptools import setup, find_packages
50+
import codecs
51+
import os
52+
53+
here = os.path.abspath(os.path.dirname(__file__))
54+
55+
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
56+
long_description = "\n" + fh.read()
57+
58+
VERSION = '0.0.13'
59+
DESCRIPTION = 'Streaming video data via networks'
60+
LONG_DESCRIPTION = 'A package that allows to build simple streams of video, audio and camera data.'
61+
62+
# Setting up
63+
setup(
64+
name="vidstream",
65+
version=VERSION,
66+
author="NeuralNine (Florian Dedov)",
67+
author_email="<mail@neuralnine.com>",
68+
description=DESCRIPTION,
69+
long_description_content_type="text/markdown",
70+
long_description=long_description,
71+
packages=find_packages(),
72+
install_requires=['opencv-python', 'pyautogui', 'pyaudio'],
73+
keywords=['python', 'video', 'stream', 'video stream', 'camera stream', 'sockets'],
74+
classifiers=[
75+
"Development Status :: 1 - Planning",
76+
"Intended Audience :: Developers",
77+
"Programming Language :: Python :: 3",
78+
"Operating System :: Unix",
79+
"Operating System :: MacOS :: MacOS X",
80+
"Operating System :: Microsoft :: Windows",
81+
]
82+
)
83+
```
84+
### Create *.whl file
85+
- install wheel package using `pip install wheel`
86+
- create python package using `python setup.py bdist_wheel`
87+
- this should generate build and dist folder on your project directory
88+
- you can find *.whl file in dist folder
89+
90+
### install package using *.whl file
91+
- just use `pip install package.whl` command to install package on your local system, if package.whl is not in your current directory then you might need to specify whole path
92+
- find this package on directory `C:\Users\Ryzen2600x\AppData\Local\Programs\Python\Python311\Lib\site-packages`

docs/4 Create Package.md

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)