Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
0e11fdb2
Commit
0e11fdb2
authored
Jan 30, 2017
by
Paul Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix OrderedDict implementation for python 2.6
parent
7349a0af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
18 deletions
+11
-18
_compat.py
flask_admin/_compat.py
+1
-14
setup.py
setup.py
+10
-4
No files found.
flask_admin/_compat.py
View file @
0e11fdb2
...
...
@@ -87,17 +87,4 @@ def with_metaclass(meta, *bases):
try
:
from
collections
import
OrderedDict
except
ImportError
:
# Bare-bones OrderedDict implementation for Python2.6 compatibility
class
OrderedDict
(
dict
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
dict
.
__init__
(
self
,
*
args
,
**
kwargs
)
self
.
ordered_keys
=
[]
def
__setitem__
(
self
,
key
,
value
):
self
.
ordered_keys
.
append
(
key
)
dict
.
__setitem__
(
self
,
key
,
value
)
def
__iter__
(
self
):
return
(
k
for
k
in
self
.
ordered_keys
)
def
iteritems
(
self
):
return
((
k
,
self
[
k
])
for
k
in
self
.
ordered_keys
)
def
items
(
self
):
return
list
(
self
.
iteritems
())
from
ordereddict
import
OrderedDict
setup.py
View file @
0e11fdb2
# Fix for older setuptools
import
re
import
os
import
sys
from
setuptools
import
setup
,
find_packages
...
...
@@ -30,6 +31,14 @@ def grep(attrname):
return
strval
install_requires
=
[
'Flask>=0.7'
,
'wtforms'
]
if
sys
.
version_info
[:
2
]
<
(
2
,
7
):
install_requires
.
append
(
'ordereddict'
)
setup
(
name
=
'Flask-Admin'
,
version
=
grep
(
'__version__'
),
...
...
@@ -43,10 +52,7 @@ setup(
include_package_data
=
True
,
zip_safe
=
False
,
platforms
=
'any'
,
install_requires
=
[
'Flask>=0.7'
,
'wtforms'
],
install_requires
=
install_requires
,
tests_require
=
[
'nose>=1.0'
,
'pillow==2.9.0'
,
...
...
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