Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.log
Utilities
Utilities
*/__pycache__/
__pycache__/
1 change: 1 addition & 0 deletions sample/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import rexe
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you try pushing the package to testpypi and try installing it from the created example pip package.. you can check the documentation : https://packaging.python.org/tutorials/packaging-projects/.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok will try it

17 changes: 17 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from setuptools import setup, find_packages

with open('README.md') as f:
readme = f.read()

with open('LICENSE') as f:
license = f.read()

setup(name='rexe',
version='0.1',
description=readme,
url='https://github.com/srijan-sivakumar/odinControl',
author='Srijan Sivakumar',
author_email='ssivakum@redhat.com',
license=license,
packages=['sample'],
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the package name should be sample..

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packages tells the place where the package rexe is. In the refactored code I had put it in sample. Thats why I had added the refactored part to this PR only
Will close this PR then.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By doing pip install . it was working on my system.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot from 2021-02-23 10-38-38

I guess sample just says that you will find an init.py in this package.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of doing the pip install . I'd say check the document as to how to use the test pypi environment and upload the package using twine and then install it in a virtualenv and see if the functionality works. Basically the package will be imported for it's class Rexe. So we need to check if that works.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, on checking with the twine to see if the distribution is syntactically correct, I get errors for the operation wherein we read the license.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of specifying the package, we can use the find_package() function provided by the setuptools module.

zip_safe=False)