define installation requirements in setup.py#11
define installation requirements in setup.py#11thatguy7 wants to merge 1 commit intopaulo-herrera:masterfrom
Conversation
|
Thanks for the suggestion. I just installed PyEVTK in a new PC (python
setup.py install) and it worked without a glitch. Maybe, you missed
something. It does not depend on any external package except Numpy for a
limited number of cases. Planning to remove that dependency in future
releases (just to make it easier to install and use).
Good luck and thanks again for contacting,
Paulo
El lun, 28 de dic. de 2020 a la(s) 17:17, Oleg Ivasenko (
notifications@github.com) escribió:
… Hi @paulo-herrera <https://github.com/paulo-herrera> ,
I noticed the installation of the package fails, when following the
install instructions but not having the requirements already installed.
This change was already proposed in #3
<#3> . I consider this a
necessity.
The change proposed in this MR makes sure that this package can be
properly installed without making assumptions about the pre-existing state
of the environment.
------------------------------
You can view, comment on, or merge this pull request online at:
#11
Commit Summary
- define installation requirements in setup.py
File Changes
- *M* setup.py
<https://github.com/paulo-herrera/PyEVTK/pull/11/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7>
(6)
Patch Links:
- https://github.com/paulo-herrera/PyEVTK/pull/11.patch
- https://github.com/paulo-herrera/PyEVTK/pull/11.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALSHZB4AXBPFRPMVCOQIGFDSXCVQNANCNFSM4VMGOCYA>
.
--
Paulo Herrera R.
Ingeniero Civil, Ph.D.
Tel: +56-936-933923
Web: *linkedin.com/in/paulo-herrera-04bbb820*
<https://www.linkedin.com/public-profile/settings?trk=d_flagship3_profile_self_view_public_profile&lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_self_edit_top_card%3BGsPQ8EG2RIWw9h4yc3pWkQ%3D%3D>
|
|
Hi @paulo-herrera , this might work for the specific OS install you have, but it does not hold up in general. Here are the steps to reproduce the problem (inside the freshly cloned PyEVTK dir):
As you can see, it does not work. The installation fails, because This is a big problem for anyone, who wants to use your package in a dedicated environment as is standard practice in python. Both |
|
Dear Oleg:
Thanks for your report. Could you please try to install Numpy first? I just
want to nail down the problem.
Thanks again,
Paulo
El dom., 24 de ene. de 2021 6:07 p. m., Oleg Ivasenko <
notifications@github.com> escribió:
… Hi @paulo-herrera <https://github.com/paulo-herrera> ,
this might work for the specific OS install you have, but it does not hold
up in general.
Here are the steps to reproduce the problem (inside the freshly cloned
PyEVTK dir):
1. Create a fresh virtual environment:
$ python -m venv venv
$ source venv/bin/activate
1. Verify that nothing is installed:
$ pip list
Package Version
---------- -------
pip 20.2.3
setuptools 49.2.1
1. Now try to install PyEVTK:
$ python setup.py install
Traceback (most recent call last):
File "/tmp/PyEVTK/setup.py", line 32, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
As you can see, it does not work. The installation fails, because numpy
is imported in setup.py.
This is a big problem for anyone, who wants to use your package in a
dedicated environment as is standard practice in python.
I encountered this, when I wanted to make PyEVTK a dependency of something
I work on. Since this package can't be installed, neither can be mine.
Both scipy and numpy are used in the package, and until you remove the
imports, both should be declared as dependencies.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALSHZB6PNJAP5LSCUBMKVZLS3SDZNANCNFSM4VMGOCYA>
.
|
|
Hi Paulo, just to be clear - I have no trouble actually using your package. Installing The issue I see and would like to improve, is that this library is not packaged correctly. It states to use You use neither, which is fine since those are only recommendations - but you also make it impossible to use your package for people who do use the default python workflow. If you want to make sure the users have In my commit, I did not change from I just noticed there is this repo that packages |
|
Hello Oleg:
Thanks for your report and solution. I will include it in the next release.
Paulo
El lun, 25 de ene. de 2021 a la(s) 14:00, Oleg Ivasenko (
notifications@github.com) escribió:
… Hi Paulo,
just to be clear - I have no trouble actually using your package.
Installing numpy first, resolves the issue.
For what I need the package for, it does an excellent job.
The issue I see and would like to improve, is that this library is not
packaged correctly.
I would like to point you to the official packaging guide:
https://packaging.python.org/guides/tool-recommendations/
It states to use pip for installation and setuptools for packaging.
You use neither, which is fine since those are only recommendations - but
you also make it impossible to use your package for people who do use the
default python workflow.
If you want to make sure the users have numpy installed when using your
package, the best way to do that is to use setuptools instead of distutils
and declare numpy as a dependency. This way numpy is installed alongside
your package when the user calls python setup.py install.
In my commit, I did not change from distutils to setuptools, but just
included the dependencies.
This way people who used distutils to install the package can continue to
do so. And people who want to use pip, can do so as well.
I just noticed there is this repo that packages PyEVTK in a publishable
way: https://github.com/pyscience-projects/pyevtk
You might consider cooperating with those guys to consolidate your
projects.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALSHZBYV2D4SUOR6GEVNGUTS3VTPBANCNFSM4VMGOCYA>
.
--
Paulo Herrera R.
Ingeniero Civil, Ph.D.
Tel: +56-936-933923
Web: *linkedin.com/in/paulo-herrera-04bbb820*
<https://www.linkedin.com/public-profile/settings?trk=d_flagship3_profile_self_view_public_profile&lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_self_edit_top_card%3BGsPQ8EG2RIWw9h4yc3pWkQ%3D%3D>
|
Hi @paulo-herrera ,
I noticed the installation of the package fails, when following the install instructions but not having the requirements already installed. This change was already proposed in #3 . I consider this a necessity.
The change proposed in this MR makes sure that this package can be properly installed without making assumptions about the pre-existing state of the environment.