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

Installation from sources fails #12

Closed
montag451 opened this issue Mar 5, 2018 · 7 comments
Closed

Installation from sources fails #12

montag451 opened this issue Mar 5, 2018 · 7 comments

Comments

@montag451
Copy link

montag451 commented Mar 5, 2018

I tried to install the package using the following command:

pip install --no-binary :all: asn1tools

It failed with the following backtrace:

Collecting asn1tools
  Using cached asn1tools-0.43.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-do00dtb9/asn1tools/setup.py", line 4, in <module>
        import asn1tools
      File "/tmp/pip-build-do00dtb9/asn1tools/asn1tools/__init__.py", line 11, in <module>
        from .compiler import compile_dict
      File "/tmp/pip-build-do00dtb9/asn1tools/asn1tools/compiler.py", line 6, in <module>
        from .parser import parse_files
      File "/tmp/pip-build-do00dtb9/asn1tools/asn1tools/parser.py", line 8, in <module>
        from pyparsing import Literal
    ImportError: No module named 'pyparsing'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-do00dtb9/asn1tools/

The problem seems to come from the fact that you import asn1tools in the setup script.

@eerimoq
Copy link
Owner

eerimoq commented Mar 5, 2018

What is the appropriate fix?

@montag451
Copy link
Author

montag451 commented Mar 5, 2018

I think the purpose of using asn1tools.__version__ to specify the package's version in the setup function was to update only one place when bumping the version number but as the dependencies of the package may not be installed when the script is run it can't work (I think pip run the setup script to discover the package dependencies). The only solution for me is to specify the version as a string in the setup function. I can make a pull request if you want :)

@eerimoq
Copy link
Owner

eerimoq commented Mar 5, 2018

A few more alternatives: https://packaging.python.org/guides/single-sourcing-package-version/

I prefer 1. as I can keep __version__ in __init__.py as the single source of the version in the package. Also, that's what pip does =) It's a bit verbose, but I can live with that.

Feel free to create a PR, hopefully based on 1.

@eerimoq
Copy link
Owner

eerimoq commented Mar 9, 2018

Any progress?

@montag451
Copy link
Author

Maybe this week-end, I will have time to work on this :)

@eerimoq
Copy link
Owner

eerimoq commented Mar 14, 2018

Closing since there is no progress and no one will likely implement this.

@eerimoq eerimoq closed this as completed Mar 14, 2018
@eerimoq
Copy link
Owner

eerimoq commented May 10, 2018

This issue was fixed in version 0.79.0 of asn1tools.

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