cirosantilli / vcdvcd

Python Verilog value change dump (VCD) parser library + the nifty vcdcat VCD command line pretty printer.
Other
54 stars 21 forks source link

Package ready for PyPi #2

Closed bmpenuelas closed 5 years ago

bmpenuelas commented 5 years ago

Package the module for upload to PyPi

cirosantilli commented 5 years ago

Is it possible to keep vcdcat and vcdvcd.py on the toplevel directory? Feels better here since the repo is so small.

cirosantilli commented 5 years ago

Also it seems that currently import vcdvcd fails with:

ImportError: No module named vcdvcd

after a local install with:

python setup.py install --user
bmpenuelas commented 5 years ago

I'd stick to the standard directory structure no matter which size the package is.

python setup.py install --user is working using Python 3.6 image

pip install -e . --user works as well, and also python -m pip install --index-url https://test.pypi.org/simple/ vcdvcd which downloads it from the test PyPi.

Can you try this last method in a new virtual env?

cirosantilli commented 5 years ago

OK, it works on Python 3 but fails on Python 2 for me, either with or without virtualenv:

>>> import vcdvcd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "vcdvcd/__init__.py", line 1, in <module>
    from vcdvcd.vcdvcd import *
ImportError: No module named vcdvcd

Do you reproduce? Is it possible to make it work for both? Ubuntu 18.10 phyton 3.6.5 and 2.7.15.

Python 3 is more important to me in general, but if it can work on both, even better.

bmpenuelas commented 5 years ago

Yes, sure, I can reproduce. That's due to the fact that Python 2 and 3 have different path handling capabilities.

Give me a minute, I'll use a construct that works for both versions.

bmpenuelas commented 5 years ago

It should import fine now with both versions, I tested it in an AWS instance running Ubuntu and it's working with both python 2.7 and 3.5.

cirosantilli commented 5 years ago

OK thanks! I'll just review this tomorrow once more and then merge it.

cirosantilli commented 5 years ago

I have merged this as: 7c60be101c2cfea12598bce8a1c31415ca70b22f and uploaded to PyPi: https://pypi.org/project/vcdvcd/

Some rationales for the changes from the PR: