From owner-freebsd-python@freebsd.org Thu Sep 20 09:35:47 2018 Return-Path: Delivered-To: freebsd-python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 143231096896 for ; Thu, 20 Sep 2018 09:35:47 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 9D18D84D85 for ; Thu, 20 Sep 2018 09:35:46 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 633261096895; Thu, 20 Sep 2018 09:35:46 +0000 (UTC) Delivered-To: python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 414E01096894 for ; Thu, 20 Sep 2018 09:35:46 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6C3D84D81; Thu, 20 Sep 2018 09:35:45 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pf1-x42c.google.com with SMTP id h79-v6so4102688pfk.8; Thu, 20 Sep 2018 02:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yxLbbeYc+YDBoAilp0BPC9JII2kJ8TCTW6LXbnKCYtk=; b=UfsQU3yq/rNr75I5ka71S48iFMVoTjj7aEyqgRoNsdciXKIfX+JSGryUse9oPboQ90 7Nsh29CvWuKGiT+Lsh8TH+BWifW8RKYR5XRNwBSPjzWTnVGXN3Se2KP2w/MyexGOx2iG 8N3bp17Fr3iI7vZICT7GP56R84FhywFSi7vFQ+VvKKENHcgxP3tjOcsOCVxmnjMw5LI1 3LzQCnKOxPQZagekFO0TP7IKaqzgj0jglMwR0T0PoCMebgBzet5EpbQFjL1dP9bPHuvn FOgNCgayoss1kL+PcgPBk1sOhLxkWr5zJHTyk4XGI787UuKgsleOM2DnfJ39oseukOb0 eRIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:cc:references:from :openpgp:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=yxLbbeYc+YDBoAilp0BPC9JII2kJ8TCTW6LXbnKCYtk=; b=L7LZ7F3Koym/sWPMNEXSQEBFNN5fY2ECtB6JQJk3CCik1Y/EsxyiDrhnfZ8yL+tkJr 8BXy+g4UUGQ8BfA7hurudlyKAb/NGrIz54w1W+HwKNCc4KJMyKd4aV/qcg+KePsYASOu HjAayRiqBJc0V4yOVOTy1XZoTadq7flMpXPAUoS5XseJojnP+Pa82vqx2lpdNkHH86gG nEUeRZHOEmBnI8zM7Gu83YwmHKuillo33/0Od7mxyGzJL36VYAXjQKWy8wAm/yV98Ogh 34eQpO1vG8uSI861wik9dgq2qDRPgU02A65iihpJsVgkMsZe0IStrDMy+G/NMtxS5PlT bThQ== X-Gm-Message-State: APzg51Bu94+hAcfniFlYBRsu8vaTzVsx/YO3XwFxjf6shtqAMoMxP7gO E467MRQS0gcSXDxAckdgoHfFScss X-Google-Smtp-Source: ANB0VdZTtBcvDmzN5HiVhjvEXdP+2KkKthWyqCJ2CnbRHablW3Fg0mBr8ww0FJAlxIUOWK7UfEt+cA== X-Received: by 2002:aa7:800f:: with SMTP id j15-v6mr40494040pfi.174.1537436144262; Thu, 20 Sep 2018 02:35:44 -0700 (PDT) Received: from [192.168.1.100] ([103.103.242.159]) by smtp.gmail.com with ESMTPSA id l6-v6sm32450022pfl.169.2018.09.20.02.35.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 02:35:43 -0700 (PDT) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: Why are devel/py-setuptools missing -I${LOCALBASE}/include ? To: Axel Rau Cc: python@FreeBSD.org, =?UTF-8?Q?Michael_Str=c3=b6der?= , Palle Girgensohn References: <9D14E231-BFD7-4442-9418-3878E70A9C71@Chaos1.DE> From: Kubilay Kocak Openpgp: preference=signencrypt Message-ID: <3f44c803-df9c-5683-3aa5-7bec1ba721a1@FreeBSD.org> Date: Thu, 20 Sep 2018 19:35:39 +1000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <9D14E231-BFD7-4442-9418-3878E70A9C71@Chaos1.DE> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 09:35:47 -0000 On 20/09/2018 6:55 pm, Axel Rau wrote: > Hi all, Hi Axel, > while doing a > pip install ldap0 > I get Standard warning first up: use of pip install as root (without --user) to install third party packages directly into the system site-packages environment is completely unsupported, and *will* break the python environment if mixing with ports/packages. The pkg-message for devel/py-pip contains this warning too. > - - - > In file included from _libldap0/LDAPObject.c:8: > _libldap0/errors.h:7:10: fatal error: 'lber.h' file not found > #include "lber.h" > ^~~~~~~~ > 1 error generated. > error: command ‚clang' failed with exit status 1 > - - - > > Shouldn’t setuptools take care of this? No. `pythonX.Y-config` on the other hand (provided by each lang/python?? port) can provide the *FLAGS that the python environment was built in/for, *if* a consumer chooses to use it. However, this is most often used only by non-Python-library softwares that want to depend on the python shared library. The options from here, depending on the specific package are: - Try CFLAGS/LDFLAGS to pass the -I/-L paths. - Try using the --include-dirs, --libraries and --library-dirs (-L) arguments to the setuptools build_ext command (see pythonX.Y setup.py build_ext --help for more) Or, just use the net/py-ldap0 port [1], which already does the right thing (it appears the ldap0 package uses a non-standard INCLUDE variable to pass things into it) Hope that helps. If you have questions and need any more help, we're always available on #freebsd-python on freenode IRC if you need us. [1] https://www.freshports.org/net/py-ldap0/ > Thanks, Axel > --- > PGP-Key:29E99DD6 ☀ computing @ chaos claudius >