Closed BECATRUE closed 1 year ago
The pip installation and the commands work as well in my machine!
How does this solve the problem?? Should it be a package, not a flat module?
If so, let's make an __init__.py
and from qiwis import *
in it.
How does this solve the problem?? Should it be a package, not a flat module?
Honestly, I don't know exactly why, but I guess that the files we want to distribute should be located in a package, and we should clarify the package name into packages
of setup.py
.
In Writing the Setup Script description, it shows how to release a package, not only a module.
If so, let's make an
__init__.py
andfrom qiwis import *
in it.
Did you intend from .qiwis import *
? I think it's a good idea!
In this case, however, python -m qiwis.qiwis -s examples/setup.json
causes an warning due to an import procedure as follows.
RuntimeWarning: 'qiwis.qiwis' found in sys.modules after import of package 'qiwis', but prior to execution of 'qiwis.qiwis'; this may result in unpredictable behaviour
Then, I suggest two solutions:
python qiwis/qiwis.py -s examples/setup.json
instead of the original command.__main__.py
in qiwis
package and write as below. Then, we can run it by python -m qiwis -s examples/setup.json
.
from .qiwis import main
main()
In Writing the Setup Script description, it shows how to release a package, not only a module.
How about this example?
In Writing the Setup Script description, it shows how to release a package, not only a module.
How about this example?
Oh, I will check the example!
Oh, I will check the example!
Oops I'm sorry it's a legacy module distutils
.
@BECATRUE Please find out my solution here! You can try:
qiwis
by
pip uninstall qiwis
qiwis
from setup-test
tag by
pip install git+https://github.com/snu-quiqcl/qiwis.git@setup-test
Does this work for you as well?
cf) I use python3 -m pip
instead of pip
.
@BECATRUE Please find out my solution here! You can try:
- uninstall your
qiwis
bypip uninstall qiwis
- install
qiwis
fromsetup-test
tag bypip install git+https://github.com/snu-quiqcl/qiwis.git@setup-test
Does this work for you as well? cf) I use
python3 -m pip
instead ofpip
.
It works so well! As you think, I think releasing only the package looks neat. Then, may I modify this like your test branch?
It works so well! As you think, I think releasing only the package looks neat. Then, may I modify this like your test branch?
Good! I only changed the packages
to py_modules
in setup()
.
A lot of parts have changed, so I made a new PR. Please come to that PR.
To resolve the error, I implemented as follows:
qiwis
directory and moveqiwis.py
in it. The structure is similar toiquip
repo's.qiwis
command toqiwis.qiwis:main
.Also, I made a pre-release for testing if it works well. Please check the following command runs correctly.
The pre-release will be removed after this PR is completed.