strongswan / swidGenerator

Application which generates SWID-Tags from Linux package managers like dpkg, rpm or pacman.
MIT License
16 stars 11 forks source link

Added setup.py to make the SWID generator easily installable #9

Closed dbrgn closed 10 years ago

dbrgn commented 10 years ago

The swid_generator script can now be installed to your local PYTHONPATH with

python setup.py install

To install only symlinks to the sourcefiles (which means that code changes are immediately reflected in the installation), use

pip install -e .

Refs tnc-ba/strongTNC#40.

cfaessler commented 10 years ago

Can you add the installation instructions to the readme file?

dbrgn commented 10 years ago

I'd wait with this until we actually upload it to PyPI when it's finished/beta.

cfaessler commented 10 years ago

it may be useful for mr steffen & tobias to test it

-------- Ursprüngliche Nachricht -------- Von: Danilo Bargen Datum:05.04.2014 19:52 (GMT+01:00) An: tnc-ba/swidGenerator Cc: Faessler Christian Betreff: Re: [swidGenerator] Added setup.py to make the SWID generator easily installable (#9)

I'd wait with this until we actually upload it to PyPI when it's finished/beta.

— Reply to this email directly or view it on GitHubhttps://github.com/tnc-ba/swidGenerator/pull/9#issuecomment-39645600.

dbrgn commented 10 years ago

Done. OK?

dbrgn commented 10 years ago

Can we merge this, @cfaessler?

cfaessler commented 10 years ago

what happens if PYTHONPATH is not set?

dbrgn commented 10 years ago

Nothing. If installing the package systemwide, it goes into /usr/lib/pythonX.X/site-packages. The PYTHONPATH variable is only relevant to the Python interpreter as far as I know.

cfaessler commented 10 years ago

then

python setup.py install

will install it systemwide if PYTHONPATH is not set? (you first comment)

dbrgn commented 10 years ago

then python setup.py install will install it systemwide if PYTHONPATH is not set? (you first comment)

  • If running the command with sudo, it will get installed systemwide.
  • If running the command without sudo, it will fail because of missing permissions.
  • If running the command in a virtualenv, it will get installed into the virtualenv.

The way setup.py was created is the same way that almost all Python packages are distributed.

cfaessler commented 10 years ago

ok, thx. You got the license to merge!

dbrgn commented 10 years ago

Yeah!

license