Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Knot DNS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
22
Issues
22
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Knot projects
Knot DNS
Commits
b937dd81
Commit
b937dd81
authored
Jul 24, 2017
by
Daniel Salzman
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python: add platform detection to fix default library name on macOS
parent
3e99dc7a
Pipeline
#10117
passed with stages
in 11 minutes and 35 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
doc/conf.py
doc/conf.py
+1
-1
python/libknot/control.py
python/libknot/control.py
+4
-1
No files found.
doc/conf.py
View file @
b937dd81
...
...
@@ -130,7 +130,7 @@ html_logo = 'logo.png'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
html_use_smartypants
=
False
#
html_use_smartypants = False
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
...
...
python/libknot/control.py
View file @
b937dd81
...
...
@@ -27,6 +27,7 @@ Example:
from
ctypes
import
cdll
,
c_void_p
,
c_int
,
c_char_p
,
c_uint
,
byref
from
enum
import
IntEnum
from
sys
import
platform
CTL_ALLOC
=
None
CTL_FREE
=
None
...
...
@@ -38,9 +39,11 @@ CTL_RECEIVE = None
CTL_ERROR
=
None
def
load_lib
(
path
=
"libknot.so"
):
def
load_lib
(
path
=
None
):
"""Loads the libknot library."""
if
path
is
None
:
path
=
"libknot.dylib"
if
sys
.
platform
==
"darwin"
else
"libknot.so"
LIB
=
cdll
.
LoadLibrary
(
path
)
global
CTL_ALLOC
...
...
Daniel Salzman
@dsalzman
mentioned in issue
#528 (closed)
·
Jul 24, 2017
mentioned in issue
#528 (closed)
mentioned in issue #528
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment