confluent-kafka-python icon indicating copy to clipboard operation
confluent-kafka-python copied to clipboard

don't install LICENSE.txt to /usr/LICENSE.txt (or $PREFIX)

Open asottile-sentry opened this issue 3 years ago • 3 comments

data_files is intended to be used to place manual files in the output. the intended mechanism for including the license in the distribution is the license_file or license_files options -- I picked the former since it has further compatibility

before:

$ CPATH="$(brew --prefix librdkafka)/include" LDFLAGS="-L$(brew --prefix librdkafka)/lib" bash -xc 'git rev-parse HEAD && rm -rf venv && virtualenv venv -qq && venv/bin/pip install -qq . && ls -al venv'
+ git rev-parse HEAD
e7e066120f05ca6f9c37b18d77f974f1a6cad222
+ rm -rf venv
+ virtualenv venv -qq
+ venv/bin/pip install -qq .
+ ls -al venv
total 44
drwxr-xr-x  8 asottile staff   256 May 12 09:30 .
drwxr-xr-x 25 asottile staff   800 May 12 09:30 ..
lrwxr-xr-x  1 asottile staff    93 May 12 09:30 .Python -> /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/Python3
-rw-r--r--  1 asottile staff    40 May 12 09:30 .gitignore
-rw-r--r--  1 asottile staff 32984 May 12 09:30 LICENSE.txt
drwxr-xr-x 20 asottile staff   640 May 12 09:30 bin
drwxr-xr-x  3 asottile staff    96 May 12 09:30 lib
-rw-r--r--  1 asottile staff   528 May 12 09:30 pyvenv.cfg

after:

$ CPATH="$(brew --prefix librdkafka)/include" LDFLAGS="-L$(brew --prefix librdkafka)/lib" bash -xc 'git rev-parse HEAD && rm -rf venv && virtualenv venv -qq && venv/bin/pip install -qq . && ls -al venv'
+ git rev-parse HEAD
4c6328c314a8c7366950161eaf161c0b89f49558
+ rm -rf venv
+ virtualenv venv -qq
+ venv/bin/pip install -qq .
+ ls -al venv
total 8
drwxr-xr-x  7 asottile staff 224 May 12 09:30 .
drwxr-xr-x 25 asottile staff 800 May 12 09:30 ..
lrwxr-xr-x  1 asottile staff  93 May 12 09:30 .Python -> /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/Python3
-rw-r--r--  1 asottile staff  40 May 12 09:30 .gitignore
drwxr-xr-x 20 asottile staff 640 May 12 09:30 bin
drwxr-xr-x  3 asottile staff  96 May 12 09:30 lib
-rw-r--r--  1 asottile staff 528 May 12 09:30 pyvenv.cfg

note that the license is still distributed but is now correctly part of the installation metadata:

$ find venv/ -name LICENSE.txt | grep confluent
venv/lib/python3.8/site-packages/confluent_kafka-1.8.3.dist-info/LICENSE.txt

asottile-sentry avatar May 12 '22 13:05 asottile-sentry

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar May 12 '22 13:05 CLAassistant

@mhowlett (apologies for the direct ping!) any chance this can get a review?

asottile-sentry avatar Jun 27 '22 17:06 asottile-sentry

@pranavrth perhaps ? been setting on this one-liner for ~4 months now and would like to get rid of /usr/LICENSE.txt from showing up :)

asottile-sentry avatar Sep 01 '22 20:09 asottile-sentry

@emasab perhaps?

asottile-sentry avatar May 22 '23 17:05 asottile-sentry

duplicate of https://github.com/confluentinc/confluent-kafka-python/pull/713

dirkmueller avatar Oct 18 '23 21:10 dirkmueller

@dirkmueller your force push here is a little shady -- my patch existed a whole year before yours used my approach: https://github.com/confluentinc/confluent-kafka-python/pull/713#event-10136637794

asottile-sentry avatar Oct 18 '23 21:10 asottile-sentry

absolutely ridiculous

asottile-sentry avatar Nov 13 '23 14:11 asottile-sentry