haddocking / pdb-tools

A dependency-free cross-platform swiss army knife for PDB files.
https://haddocking.github.io/pdb-tools/
Apache License 2.0
372 stars 113 forks source link

pip install does not install LICENSE file #93

Closed Gerardwx closed 3 years ago

Gerardwx commented 3 years ago

Describe the bug After doing the recommended pip install, the LICENSE file is not installed

To Reproduce pip install --target /tmp/example pdf-tools

Expected behavior LICENSE should be found somewhere in /tmp/example

Desktop (please complete the following information):

joaomcteixeira commented 3 years ago

Hi @Gerardwx

Thanks for raising this issue. Indeed LICENSE was installed when using Python 3 but it was not there when using Python 2.7.

@JoaoRodrigues , I worked around this, but before me submitting a PR, what do you think of this simple implementation? Is in my fork.

I tried MANIFEST.in and setup.cfg but I believe these strategies have changed much from 2.7 to 3.7. Failed to apply them as is for 2.7. That is why I decided to use the additional files argument. Let me know your toughts.

Cheers,

JoaoRodrigues commented 3 years ago

The LICENSE file is actually installed already in the dist folder. For instance, on my machine:

(piptest) λ ls C:\Users\joaor\Miniconda3\envs\piptest\Lib\site-packages\pdb_tools-2.2.3.dist-info\
direct_url.json  entry_points.txt  INSTALLER  LICENSE  METADATA  RECORD  REQUESTED  top_level.txt  WHEEL

You can also query this information using pip, although this gets the info from PyPI:

(piptest) λ pip show pdb-tools
Name: pdb-tools
Version: 2.2.3
Summary: A swiss army knife for PDB files.
Home-page: http://bonvinlab.org/pdb-tools
Author: Joao Rodrigues
Author-email: j.p.g.l.m.rodrigues@gmail.com
License: Apache Software License, version 2
Location: c:\users\joaor\miniconda3\envs\piptest\lib\site-packages
Requires:
Required-by:

So, I personally don't see why we should duplicate this information or why it would be even useful for anyone to have it as an actual file in the source directory. Unless @Gerardwx has a very specific reason to want the file in that specific folder, I would rather leave this as is.

JoaoRodrigues commented 3 years ago

Also, we are not making any effort to keep the tools running on Python 2.7, since it was deprecated one year ago (2020-01-01). If tools break, or don't work any more after an update, please make sure to update to Python 3.x.

Gerardwx commented 3 years ago

Even with pip3, on a Ubuntu system, (18.04), it is not showing:

ls -lR pdf_tools-0.2.0.dist-info/ pdf_tools-0.2.0.dist-info/: total 32 -rw-r--r-- 1 gweatherby uconnhealth 1358 Jan 28 06:04 DESCRIPTION.rst -rw-r--r-- 1 gweatherby uconnhealth 175 Jan 28 06:04 entry_points.txt -rw-r--r-- 1 gweatherby uconnhealth 4 Jan 28 06:04 INSTALLER -rw-r--r-- 1 gweatherby uconnhealth 2144 Jan 28 06:04 METADATA -rw-r--r-- 1 gweatherby uconnhealth 1339 Jan 28 06:04 metadata.json -rw-r--r-- 1 gweatherby uconnhealth 1273 Jan 28 06:04 RECORD -rw-r--r-- 1 gweatherby uconnhealth 0 Jan 28 06:04 REQUESTED -rw-r--r-- 1 gweatherby uconnhealth 10 Jan 28 06:04 top_level.txt -rw-r--r-- 1 gweatherby uconnhealth 92 Jan 28 06:04 WHEEL

It is a requirement of the license to include it in a redistribution:

  1. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:

    (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and

mtrellet commented 3 years ago

I'm confused, are we talking about the same tool?

You are showing logs of a package named pdf-tools. However, this repository is dedicated to pdb-tools. I imagine you're looking for this package: https://pypi.org/project/pdf-tools/

Gerardwx commented 3 years ago

This is seriously embarrassing... sorry, Never mind!

JoaoRodrigues commented 3 years ago

No worries, I usually make the opposite typo: pdf->pdb!