Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python-docx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ANDES
python-docx
Commits
0832d7d1
Commit
0832d7d1
authored
11 years ago
by
Steve Canny
Browse files
Options
Downloads
Patches
Plain Diff
hotfix: setup error on Windows
* remove non-ascii characters from LICENSE * refactor file reading in setup.py
parent
a6228070
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
HISTORY.rst
+17
-1
17 additions, 1 deletion
HISTORY.rst
LICENSE
+3
-3
3 additions, 3 deletions
LICENSE
docx/__init__.py
+1
-1
1 addition, 1 deletion
docx/__init__.py
setup.py
+18
-8
18 additions, 8 deletions
setup.py
with
39 additions
and
13 deletions
HISTORY.rst
+
17
−
1
View file @
0832d7d1
...
...
@@ -3,6 +3,23 @@
Release History
---------------
0.3.0a3 (2014-01-06)
++++++++++++++++++++++
- Fix setup.py error on some Windows installs
0.3.0a1 (2014-01-05)
++++++++++++++++++++++
- Full object-oriented rewrite
- Feature-parity with prior version
- text: add paragraph, run, text, bold, italic
- table: add table, add row, add column
- styles: specify style for paragraph, table
- picture: add inline picture, auto-scaling
- breaks: add page break
- tests: full pytest and behave-based 2-layer test suite
0.3.0dev1 (2013-12-14)
++++++++++++++++++++++
...
...
@@ -10,4 +27,3 @@ Release History
- Load default "template" .docx on open with no filename
- Open from stream and save to stream (file-like object)
- Add paragraph at and of document
This diff is collapsed.
Click to expand it.
LICENSE
+
3
−
3
View file @
0832d7d1
The MIT License (MIT)
Copyright
©
2013 Steve Canny, https://github.com/scanny
Copyright
(c)
2013 Steve Canny, https://github.com/scanny
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the
“
Software
”
), to deal
of this software and associated documentation files (the
"
Software
"
), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
...
...
@@ -11,7 +11,7 @@ furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED
“
AS IS
”
, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
THE SOFTWARE IS PROVIDED
"
AS IS
"
, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
...
...
This diff is collapsed.
Click to expand it.
docx/__init__.py
+
1
−
1
View file @
0832d7d1
...
...
@@ -2,7 +2,7 @@
from
docx.api
import
Document
# noqa
__version__
=
'
0.3.0a
1
'
__version__
=
'
0.3.0a
3
'
# register custom Part classes with opc package reader
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
18
−
8
View file @
0832d7d1
...
...
@@ -5,13 +5,25 @@ import re
from
setuptools
import
find_packages
,
setup
def
text_of
(
relpath
):
"""
Return string containing the contents of the file at *relpath* relative to
this file.
"""
thisdir
=
os
.
path
.
dirname
(
__file__
)
file_path
=
os
.
path
.
join
(
thisdir
,
os
.
path
.
normpath
(
relpath
))
with
open
(
file_path
)
as
f
:
text
=
f
.
read
()
text
.
decode
(
'
ascii
'
)
# result discarded, just make sure no non-ascii chars
return
text
# Read the version from docx.__version__ without importing the package
# (and thus attempting to import packages it depends on that may not be
# installed yet)
thisdir
=
os
.
path
.
dirname
(
__file__
)
init_py
=
os
.
path
.
join
(
thisdir
,
'
docx
'
,
'
__init__.py
'
)
version
=
re
.
search
(
"
__version__ =
'
([^
'
]+)
'"
,
open
(
init_py
).
read
()).
group
(
1
)
license
=
os
.
path
.
join
(
thisdir
,
'
LICENSE
'
)
version
=
re
.
search
(
"
__version__ =
'
([^
'
]+)
'"
,
text_of
(
'
docx/__init__.py
'
)
).
group
(
1
)
NAME
=
'
python-docx
'
...
...
@@ -21,7 +33,7 @@ KEYWORDS = 'docx office openxml word'
AUTHOR
=
'
Steve Canny
'
AUTHOR_EMAIL
=
'
python-docx@googlegroups.com
'
URL
=
'
https://github.com/python-openxml/python-docx
'
LICENSE
=
open
(
license
).
read
(
)
LICENSE
=
text_of
(
'
LICENSE
'
)
PACKAGES
=
find_packages
(
exclude
=
[
'
tests
'
,
'
tests.*
'
])
PACKAGE_DATA
=
{
'
docx
'
:
[
'
templates/*
'
]}
...
...
@@ -46,9 +58,7 @@ CLASSIFIERS = [
'
Topic :: Software Development :: Libraries
'
]
readme
=
os
.
path
.
join
(
thisdir
,
'
README.rst
'
)
history
=
os
.
path
.
join
(
thisdir
,
'
HISTORY.rst
'
)
LONG_DESCRIPTION
=
open
(
readme
).
read
()
+
'
\n\n
'
+
open
(
history
).
read
()
LONG_DESCRIPTION
=
text_of
(
'
README.rst
'
)
+
'
\n\n
'
+
text_of
(
'
HISTORY.rst
'
)
params
=
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment