Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have modified the code on this project, may I ask how to package the latest code and run it without IDE? #1449

Closed
DuXiaoChuang opened this issue Jul 3, 2024 · 6 comments
Assignees
Labels
can be closed If bug fixed or feature is implemented help wanted

Comments

@DuXiaoChuang
Copy link

I have modified the code on this project, may I ask how to package the latest code and run it without IDE? What does the for_bulid folder for this picture do

image

@imbeacon
Copy link
Member

imbeacon commented Jul 3, 2024

Hi @DuXiaoChuang,

It depends on what kind of distribution you want, if you want just python package you can run python3 setup.py sdist or python3 -m build in the root folder, the package will be in dist folder. In case you need a debian or rpm package you will need to run make_packages.sh script. If you want to create your own debian image - you can copy Dockerfile from docker folder to the root and just run docker build . -t my-gateway (replace my-gateway with any tag that you want).

@DuXiaoChuang
Copy link
Author

Hi @DuXiaoChuang,

It depends on what kind of distribution you want, if you want just python package you can run python3 setup.py sdist or python3 -m build in the root folder, the package will be in dist folder. In case you need a debian or rpm package you will need to run make_packages.sh script. If you want to create your own debian image - you can copy Dockerfile from docker folder to the root and just run docker build . -t my-gateway (replace my-gateway with any tag that you want).

error message is displayed after run make packages.sh script
76856cd7473ca8e245f8154e8d70ec9

@DuXiaoChuang
Copy link
Author

DuXiaoChuang commented Jul 3, 2024

Hi @DuXiaoChuang,

It depends on what kind of distribution you want, if you want just python package you can run python3 setup.py sdist or python3 -m build in the root folder, the package will be in dist folder. In case you need a debian or rpm package you will need to run make_packages.sh script. If you want to create your own debian image - you can copy Dockerfile from docker folder to the root and just run docker build . -t my-gateway (replace my-gateway with any tag that you want).

I run python3 setup.py sdist or python3 -m build in the root folder,the package not in dist folder

image
Uploading image.png…

@imbeacon
Copy link
Member

imbeacon commented Jul 3, 2024

python3 setup.py sdist creates python source distribution and you can install it using the following pip install dist/thingsboard-gateway-3.5.1.tar.gz

According to the issue with make_packages - you need to install additional packages, using command pip3 install bdist_rpm, as far as I remember, please try the first option with pip and if it won’t help you, I will check libraries that required to build rpm package.

@DuXiaoChuang
Copy link
Author

python3 setup.py sdist creates python source distribution and you can install it using the following pip install dist/thingsboard-gateway-3.5.1.tar.gz

According to the issue with make_packages - you need to install additional packages, using command pip3 install bdist_rpm, as far as I remember, please try the first option with pip and if it won’t help you, I will check libraries that required to build rpm package.

I successfully installed /thingsboard-gateway-3.4.6.tar.gz on windows. How do I start and run

@imbeacon
Copy link
Member

imbeacon commented Jul 3, 2024

You can run it for example using the following command: python3 path/to/installed/package/thingsbaord_gateway/tb_gateway.py

@imbeacon imbeacon added the can be closed If bug fixed or feature is implemented label Jul 11, 2024
@imbeacon imbeacon closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can be closed If bug fixed or feature is implemented help wanted
Projects
None yet
Development

No branches or pull requests

3 participants