Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Merge requests
  • !273

Prebuilt libraries should default to the native extension for the platform

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Mike Kaplinskiy requested to merge github/fork/mikekap/dylib into master Mar 13, 2015
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 3

Also allows you to do something like (albeit ugly, but working):

import subprocess
import collections

# A small amount of magic to get cxx_python_extension working.
python_ldflags = subprocess.check_output('python-config --ldflags', shell=True).split()
prebuilt_cxx_library(
    name='pylib',
    provided=True,
    lib_name='python2.7',
    lib_dir=[v[len('-L'):] for v in python_ldflags if v.startswith('-L')][0],
    include_dirs=[v[len('-I'):] for v in
                  subprocess.check_output('python-config --includes', shell=True).split()],
    linker_flags=python_ldflags,
    visibility=['PUBLIC']
)
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/mikekap/dylib