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

Project status and installation #2

Open
DancingQuanta opened this issue May 4, 2020 · 2 comments
Open

Project status and installation #2

DancingQuanta opened this issue May 4, 2020 · 2 comments

Comments

@DancingQuanta
Copy link

Hello.

I am asking what is the current status of this project?
I am keen to use this library, and I am not sure what are the recommended installation process for this library. I tried the usual pip install -e . however, I got an error below

-> pip install -e .
Obtaining file:///C:/Users/at17/repos/NTMDTRead
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\at17\.conda\envs\sthm\python.exe' 'C:\Users\at17\.conda\envs\sthm\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\at17\AppData\Local\Temp\pip-build-env-uwik0ckn\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=44' wheel 'setuptools_scm[toml]>=3.4.3' 'kaitaiStructCompile.setuptools[toml]'
       cwd: None
  Complete output (8 lines):
  Collecting setuptools>=44
    Using cached setuptools-46.1.3-py3-none-any.whl (582 kB)
  Collecting wheel
    Downloading wheel-0.34.2-py2.py3-none-any.whl (26 kB)
  Collecting setuptools_scm[toml]>=3.4.3
    Downloading setuptools_scm-3.5.0-py2.py3-none-any.whl (26 kB)
  ERROR: Could not find a version that satisfies the requirement kaitaiStructCompile.setuptools[toml] (from versions: none)
  ERROR: No matching distribution found for kaitaiStructCompile.setuptools[toml]
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\at17\.conda\envs\sthm\python.exe' 'C:\Users\at17\.conda\envs\sthm\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\at17\AppData\Local\Temp\pip-build-env-uwik0ckn\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=44' wheel 'setuptools_scm[toml]>=3.4.3' 'kaitaiStructCompile.setuptools[toml]' Check the logs for full command output.

I checked that there are no kaitaiStructCompile.setuptools in the PYPI and you are an author of this package so you must be familiar with these projects. I have not seen this type of setuptools installation process before (I haven't used myproject.toml or config.cfg before) and so I am unable to to install this library.

In the meantime I will gut some codes out and test them since I am starting to work on some data from NT-MDT and I am keen to keep using python for this work.

@KOLANICH
Copy link
Member

Hello. Thanks for the interest.

I checked that there are no kaitaiStructCompile.setuptools in the PYPI

It is not distributed via pypi. Pypi is becoming the same junk as npm is (there were multiple times malware have been planted into npm, one time it has even been used to steal money from users of a cryptocurrency exchange (just google about this), so backdoors is a very serious issue that shouldn't be ignored). So I prefer to stay away of pypi and install the stuff from git repos of authors, so at least someons have looked into the code there.

kaitaiStructCompile setuptools addon is available in the repo by the link and is recommended to be installed from there (keep in mind that kaitaiStructCompile is changed by me it sometimes in breaking ways without any warnings). It should automatically install other packages needed.

Unfortunately neither setup_requires in setup.py/setup.cfg nor pyproject.toml currently support PEP 508 specifiers, allowing to install the build dependencies automatically for this project, so you will have to install kaitaiStructCompile manually.

You will also need git and Kaitai Struct compiler, the nightly version installed. If you use Linux, you can look into https://gitlab.com/kaitaiStructCompile.py/kaitai_struct_python_docker/-/blob/master/setupKS.sh for the instructions on how to install it automatically. On Windows just download the installer from the official website and just install (or you can just unpack the msi without installation using lessmsi, the app is portable, so the installer is not really needed, I recommend doing this way).

After it set the env variable KAITAI_STRUCT_ROOT to the dir containing bin, lib and formats subdirs. Or just add bin subdir into PATH.

Sorry for the late answer, I was offline for some time.

@DancingQuanta
Copy link
Author

Good to hear from you.

You have a valid reason for distributing in this way outside of PYPI. I was not aware of the PYPI's security issues. I work with scientific python packages from PYPI and conda. The only protection I use against PYPI's weak security is confirming authorship and alternative source such as github.
I wonder if the conda would be a good distribution platform for you? I am not aware of any security issues with conda code repos but I expect it may be similar to PYPI's.

I will try your installation instructions and see how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants