Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
8d98a55d
Commit
8d98a55d
authored
Nov 11, 2013
by
Marcus Cobden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix setup.py to work with 'pip install -e .'
parent
bd38e6d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
13 deletions
+25
-13
lib/ansible/constants.py
+7
-7
setup.py
+18
-6
No files found.
lib/ansible/constants.py
View file @
8d98a55d
...
@@ -82,13 +82,13 @@ p = load_config_file()
...
@@ -82,13 +82,13 @@ p = load_config_file()
active_user
=
pwd
.
getpwuid
(
os
.
geteuid
())[
0
]
active_user
=
pwd
.
getpwuid
(
os
.
geteuid
())[
0
]
# Needed so the RPM can call setup.py and have modules land in the
DIST_MODULE_PATH
=
os
.
path
.
join
(
sys
.
prefix
,
'share/ansible/'
)
# correct location. See #1277 for discussion
EDITABLE_MODULE_PATH
=
os
.
path
.
normpath
(
if
getattr
(
sys
,
"real_prefix"
,
None
):
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'../../library'
))
# in a virtualenv
DIST_MODULE_PATH
=
os
.
path
.
join
(
sys
.
prefix
,
'share/ansible/'
)
if
not
os
.
path
.
exists
(
DIST_MODULE_PATH
)
\
else
:
and
os
.
path
.
exists
(
EDITABLE_MODULE_PATH
)
:
DIST_MODULE_PATH
=
'/usr/share/ansible/'
DIST_MODULE_PATH
=
EDITABLE_MODULE_PATH
# sections in config file
# sections in config file
DEFAULTS
=
'defaults'
DEFAULTS
=
'defaults'
...
...
setup.py
View file @
8d98a55d
...
@@ -4,15 +4,27 @@ import os
...
@@ -4,15 +4,27 @@ import os
import
sys
import
sys
from
glob
import
glob
from
glob
import
glob
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'lib'
))
def
rel
(
f
):
return
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
f
)
sys
.
path
.
insert
(
0
,
rel
(
'lib'
))
from
ansible
import
__version__
,
__author__
from
ansible
import
__version__
,
__author__
from
distutils.core
import
setup
from
distutils.core
import
setup
# find library modules
# Needed so the RPM can call setup.py and have modules land in the
from
ansible.constants
import
DEFAULT_MODULE_PATH
# correct location. See #1277 for discussion
dirs
=
os
.
listdir
(
"./library/"
)
if
getattr
(
sys
,
"real_prefix"
,
None
):
# in a virtualenv
DEFAULT_MODULE_PATH
=
os
.
path
.
join
(
sys
.
prefix
,
'share/ansible/library'
)
else
:
DEFAULT_MODULE_PATH
=
'/usr/share/ansible/library'
module_path
=
DEFAULT_MODULE_PATH
if
not
os
.
path
.
exists
(
DEFAULT_MODULE_PATH
):
module_path
=
rel
(
'library'
)
data_files
=
[]
data_files
=
[]
for
i
in
dirs
:
for
i
in
os
.
listdir
(
module_path
)
:
data_files
.
append
((
os
.
path
.
join
(
DEFAULT_MODULE_PATH
,
i
),
glob
(
'./library/'
+
i
+
'/*'
)))
data_files
.
append
((
os
.
path
.
join
(
DEFAULT_MODULE_PATH
,
i
),
glob
(
'./library/'
+
i
+
'/*'
)))
setup
(
name
=
'ansible'
,
setup
(
name
=
'ansible'
,
...
@@ -23,7 +35,7 @@ setup(name='ansible',
...
@@ -23,7 +35,7 @@ setup(name='ansible',
url
=
'http://ansibleworks.com/'
,
url
=
'http://ansibleworks.com/'
,
license
=
'GPLv3'
,
license
=
'GPLv3'
,
install_requires
=
[
'paramiko'
,
'jinja2'
,
"PyYAML"
],
install_requires
=
[
'paramiko'
,
'jinja2'
,
"PyYAML"
],
package_dir
=
{
'
ansible'
:
'lib/ansible
'
},
package_dir
=
{
'
'
:
'lib
'
},
packages
=
[
packages
=
[
'ansible'
,
'ansible'
,
'ansible.utils'
,
'ansible.utils'
,
...
...
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