gyanz / pydsstools

Python library for simple HEC-DSS functions
MIT License
83 stars 36 forks source link

Can we please get a conda-forge feedstock? #32

Closed openSourcerer9000 closed 2 years ago

openSourcerer9000 commented 2 years ago

Have you considered putting this package on a language-agnostic package manager like conda? I'm a big fan of this package but I've only gotten it working by copying the whole project over, or using the wheel file. The wheel works well, but it doesn't seem as repeatable as spinning up an env with conda create -n myEnv -c conda-forge python=3.8 pydsstools.

This is as far as I was able to get in the setup from source. I tried uninstalling visual studio 2022 and moving back to 2019, still no luck:

(raz) C:\Py\pydsstools>python setup.py install 
setup directory: 'C:\\Py\\pydsstools'
running install
C:\Users\openSourcerer9000\Anaconda3\envs\raz\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
C:\Users\openSourcerer9000\Anaconda3\envs\raz\lib\site-packages\setuptools\command\easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing pydsstools.egg-info\PKG-INFO
writing dependency_links to pydsstools.egg-info\dependency_links.txt
writing requirements to pydsstools.egg-info\requires.txt
writing top-level names to pydsstools.egg-info\top_level.txt        
reading manifest file 'pydsstools.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'pydsstools.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg   
running install_lib
running build_py
running build_ext
Building external library: grid.lib
Using "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" (found in the Visual Studio installation)
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 12/14/2021 2:14:45 PM.
Project "C:\Py\pydsstools\pydsstools\src\external\gridv6\grid.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Release|x64".
Project "C:\Py\pydsstools\pydsstools\src\external\gridv6\grid.sln" (1) is building "C:\Py\pydsstools\pydsstools\src\external\gridv6\grid.vcxproj" (2) on node 1 (default targets).
InitializeBuildStatus:
  Creating "x64\Release\intermediate\grid.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  All outputs are up-to-date.
  All outputs are up-to-date.
Lib:
  All outputs are up-to-date.
  grid.vcxproj -> C:\Py\pydsstools\pydsstools\src\external\gridv6\x64\Release\grid.lib
FinalizeBuildStatus:
  Deleting file "x64\Release\intermediate\grid.tlog\unsuccessfulbuild".
  Touching "x64\Release\intermediate\grid.tlog\grid.lastbuildstate".
Done Building Project "C:\Py\pydsstools\pydsstools\src\external\gridv6\grid.vcxproj" (default targets).

Done Building Project "C:\Py\pydsstools\pydsstools\src\external\gridv6\grid.sln" (default targets).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.11
x64\release\grid.lib
1 File(s) copied
building 'pydsstools._lib.x64.core_heclib' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipydsstools/src/external/dss/headers -Ipydsstools/src/external/gridv6/headers -Ipydsstools/src/external/zlib -IC:\Users\openSourcerer9000\Anaconda3\envs\raz\lib\site-packages\numpy\core\include -IC:\Users\openSourcerer9000\Anaconda3\envs\raz\include -IC:\Users\openSourcerer9000\Anaconda3\envs\raz\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcpydsstools/src/core_heclib.c /Fobuild\temp.win-amd64-3.9\Release\pydsstools/src/core_heclib.obj
core_heclib.c
C:\Users\openSourcerer9000\Anaconda3\envs\raz\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
pydsstools/src/core_heclib.c(6554): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
pydsstools/src/core_heclib.c(16429): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pydsstools/src/core_heclib.c(16707): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pydsstools/src/core_heclib.c(17001): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pydsstools/src/core_heclib.c(48057): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pydsstools/src/core_heclib.c(48154): warning C4090: '=': different 'const' qualifiers
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:pydsstools/src/external/dss/win64 /LIBPATH:pydsstools/src/external/gridv6/build /LIBPATH:pydsstools/src/external/zlib /LIBPATH:C:\Users\openSourcerer9000\Anaconda3\envs\raz\libs /LIBPATH:C:\Users\openSourcerer9000\Anaconda3\envs\raz\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64 heclib_c.lib heclib_f.lib zlibstatic.lib grid.lib /EXPORT:PyInit_core_heclib build\temp.win-amd64-3.9\Release\pydsstools/src/core_heclib.obj /OUT:build\lib.win-amd64-3.9\pydsstools\_lib\x64\core_heclib.cp39-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.9\Release\pydsstools/src\core_heclib.cp39-win_amd64.lib /NODEFAULTLIB:LIBCMT
LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104

windows, conda env, python 3.9

gyanz commented 2 years ago

Currently, I have no plans to put the package in conda. You can install the package in conda environment by activating the environment first and running "pip install wheel_file" command.