Skip to content

Commit 8f35c01

Browse files
committed
removed special py3 handling code from setup.py and travis files
1 parent e285994 commit 8f35c01

File tree

6 files changed

+10
-395
lines changed

6 files changed

+10
-395
lines changed

.travis.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,21 @@ python:
1414
- 3.4
1515
- 3.5
1616
- 3.6
17-
# - "pypy"
1817

1918
before_install:
2019
- pip install -U setuptools pip # seems travis comes with a too old setuptools for html5lib
2120
- bash .travis.fuseki_install_optional.sh
2221

2322
install:
24-
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then pip install --default-timeout 60 -r requirements.py2.txt; fi
25-
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '3' ]]; then pip install --default-timeout 60 -r requirements.py3.txt; fi
26-
# isodate0.4.8 is problematic with Pypy, use fixed version
27-
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install --upgrade "https://bitbucket.org/gjhiggins/isodate/downloads/isodate-0.4.8.tar.gz"; pip install --default-timeout 60 "elementtree"; fi
23+
- pip install --default-timeout 60 -r requirements.txt
2824
- pip install --default-timeout 60 coverage coveralls nose-timer && export HAS_COVERALLS=1
2925
- python setup.py install
3026

3127
before_script:
32-
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]] || [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then flake8 --exclude=pyRdfa,extras,host,transform,rdfs,sparql,results,pyMicrodata --exit-zero rdflib; fi
28+
- flake8 --exclude=pyRdfa,extras,host,transform,rdfs,sparql,results,pyMicrodata --exit-zero rdflib; fi
3329

3430
script:
35-
# Must run the tests in build/src so python3 doesn't get confused and run
36-
# the python2 code from the current directory instead of the installed
37-
# 2to3 version in build/src.
38-
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then PYTHONWARNINGS=default nosetests --with-timer --timer-top-n 42 --with-coverage --cover-tests --cover-package=rdflib ; fi
39-
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '3' ]]; then PYTHONWARNINGS=default nosetests --with-timer --timer-top-n 42 --with-coverage --cover-tests --cover-package=build/src/rdflib --where=./build/src; fi
31+
- PYTHONWARNINGS=default nosetests --with-timer --timer-top-n 42 --with-coverage --cover-tests --cover-package=rdflib
4032

4133
after_success:
4234
- if [[ $HAS_COVERALLS ]] ; then coveralls ; fi

requirements.py3.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.
File renamed without changes.

run_tests_py3.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

setup.py

Lines changed: 7 additions & 315 deletions
Original file line numberDiff line numberDiff line change
@@ -1,324 +1,16 @@
11
#!/usr/bin/env python
2-
import sys
3-
import os
4-
import re
5-
6-
7-
def setup_python3():
8-
# Taken from "distribute" setup.py
9-
from distutils.filelist import FileList
10-
from distutils import dir_util, file_util, util, log
11-
from os.path import join, exists
12-
13-
tmp_src = join("build", "src")
14-
# Not covered by "setup.py clean --all", so explicit deletion required.
15-
if exists(tmp_src):
16-
dir_util.remove_tree(tmp_src)
17-
# log.set_verbosity(1)
18-
fl = FileList()
19-
for line in open("MANIFEST.in"):
20-
if not line.strip():
21-
continue
22-
fl.process_template_line(line)
23-
dir_util.create_tree(tmp_src, fl.files)
24-
outfiles_2to3 = []
25-
for f in fl.files:
26-
outf, copied = file_util.copy_file(f, join(tmp_src, f), update=1)
27-
if copied and outf.endswith(".py"):
28-
outfiles_2to3.append(outf)
29-
30-
six_ed = [ # uncomment files which have already been transformed to use six
31-
join(tmp_src, 'docs', 'conf.py'),
32-
join(tmp_src, 'docs', 'plugintable.py'),
33-
join(tmp_src, 'examples', '__init__.py'),
34-
join(tmp_src, 'examples', 'conjunctive_graphs.py'),
35-
join(tmp_src, 'examples', 'custom_datatype.py'),
36-
join(tmp_src, 'examples', 'custom_eval.py'),
37-
join(tmp_src, 'examples', 'film.py'),
38-
join(tmp_src, 'examples', 'foafpaths.py'),
39-
join(tmp_src, 'examples', 'prepared_query.py'),
40-
join(tmp_src, 'examples', 'rdfa_example.py'),
41-
join(tmp_src, 'examples', 'resource.py'),
42-
join(tmp_src, 'examples', 'simple_example.py'),
43-
join(tmp_src, 'examples', 'sleepycat_example.py'),
44-
join(tmp_src, 'examples', 'slice.py'),
45-
join(tmp_src, 'examples', 'smushing.py'),
46-
join(tmp_src, 'examples', 'sparql_query_example.py'),
47-
join(tmp_src, 'examples', 'sparql_update_example.py'),
48-
join(tmp_src, 'examples', 'sparqlstore_example.py'),
49-
join(tmp_src, 'examples', 'swap_primer.py'),
50-
join(tmp_src, 'examples', 'transitive.py'),
51-
join(tmp_src, 'rdflib', '__init__.py'),
52-
join(tmp_src, 'rdflib', 'collection.py'),
53-
join(tmp_src, 'rdflib', 'compare.py'),
54-
join(tmp_src, 'rdflib', 'compat.py'),
55-
join(tmp_src, 'rdflib', 'events.py'),
56-
join(tmp_src, 'rdflib', 'exceptions.py'),
57-
join(tmp_src, 'rdflib', 'extras', '__init__.py'),
58-
join(tmp_src, 'rdflib', 'extras', 'cmdlineutils.py'),
59-
join(tmp_src, 'rdflib', 'extras', 'describer.py'),
60-
join(tmp_src, 'rdflib', 'extras', 'infixowl.py'),
61-
join(tmp_src, 'rdflib', 'graph.py'),
62-
join(tmp_src, 'rdflib', 'namespace.py'),
63-
join(tmp_src, 'rdflib', 'parser.py'),
64-
join(tmp_src, 'rdflib', 'paths.py'),
65-
join(tmp_src, 'rdflib', 'plugin.py'),
66-
join(tmp_src, 'rdflib', 'plugins', '__init__.py'),
67-
join(tmp_src, 'rdflib', 'plugins', 'memory.py'),
68-
join(tmp_src, 'rdflib', 'plugins', 'parsers', '__init__.py'),
69-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'hturtle.py'),
70-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'notation3.py'),
71-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'nquads.py'),
72-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'nt.py'),
73-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'ntriples.py'),
74-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyMicrodata', '__init__.py'),
75-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyMicrodata', 'microdata.py'),
76-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyMicrodata', 'registry.py'),
77-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyMicrodata', 'utils.py'),
78-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', '__init__.py'),
79-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'embeddedRDF.py'),
80-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'extras', '__init__.py'),
81-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'extras', 'httpheader.py'),
82-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'host', '__init__.py'),
83-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'host', 'atom.py'),
84-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'host', 'html5.py'),
85-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'initialcontext.py'),
86-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'options.py'),
87-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'parse.py'),
88-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'property.py'),
89-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'rdfs', '__init__.py'),
90-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'rdfs', 'cache.py'),
91-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'rdfs', 'process.py'),
92-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'state.py'),
93-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'termorcurie.py'),
94-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'transform', '__init__.py'),
95-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'transform', 'DublinCore.py'),
96-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'transform', 'lite.py'),
97-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'transform', 'metaname.py'),
98-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'transform', 'OpenID.py'),
99-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'transform', 'prototype.py'),
100-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'pyRdfa', 'utils.py'),
101-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'rdfxml.py'),
102-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'structureddata.py'),
103-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'trig.py'),
104-
join(tmp_src, 'rdflib', 'plugins', 'parsers', 'trix.py'),
105-
join(tmp_src, 'rdflib', 'plugins', 'serializers', '__init__.py'),
106-
join(tmp_src, 'rdflib', 'plugins', 'serializers', 'n3.py'),
107-
join(tmp_src, 'rdflib', 'plugins', 'serializers', 'nquads.py'),
108-
join(tmp_src, 'rdflib', 'plugins', 'serializers', 'nt.py'),
109-
join(tmp_src, 'rdflib', 'plugins', 'serializers', 'rdfxml.py'),
110-
join(tmp_src, 'rdflib', 'plugins', 'serializers', 'trig.py'),
111-
join(tmp_src, 'rdflib', 'plugins', 'serializers', 'trix.py'),
112-
join(tmp_src, 'rdflib', 'plugins', 'serializers', 'turtle.py'),
113-
join(tmp_src, 'rdflib', 'plugins', 'serializers', 'xmlwriter.py'),
114-
join(tmp_src, 'rdflib', 'plugins', 'sleepycat.py'),
115-
join(tmp_src, 'rdflib', 'plugins', 'sparql', '__init__.py'),
116-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'aggregates.py'),
117-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'algebra.py'),
118-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'datatypes.py'),
119-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'evaluate.py'),
120-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'evalutils.py'),
121-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'operators.py'),
122-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'parser.py'),
123-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'parserutils.py'),
124-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'processor.py'),
125-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'results', '__init__.py'),
126-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'results', 'csvresults.py'),
127-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'results', 'jsonresults.py'),
128-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'results', 'rdfresults.py'),
129-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'results', 'tsvresults.py'),
130-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'results', 'txtresults.py'),
131-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'results', 'xmlresults.py'),
132-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'sparql.py'),
133-
join(tmp_src, 'rdflib', 'plugins', 'sparql', 'update.py'),
134-
join(tmp_src, 'rdflib', 'plugins', 'stores', '__init__.py'),
135-
join(tmp_src, 'rdflib', 'plugins', 'stores', 'auditable.py'),
136-
join(tmp_src, 'rdflib', 'plugins', 'stores', 'concurrent.py'),
137-
join(tmp_src, 'rdflib', 'plugins', 'stores', 'regexmatching.py'),
138-
join(tmp_src, 'rdflib', 'plugins', 'stores', 'sparqlstore.py'),
139-
join(tmp_src, 'rdflib', 'py3compat.py'),
140-
join(tmp_src, 'rdflib', 'query.py'),
141-
join(tmp_src, 'rdflib', 'resource.py'),
142-
join(tmp_src, 'rdflib', 'serializer.py'),
143-
join(tmp_src, 'rdflib', 'store.py'),
144-
join(tmp_src, 'rdflib', 'term.py'),
145-
join(tmp_src, 'rdflib', 'tools', '__init__.py'),
146-
join(tmp_src, 'rdflib', 'tools', 'csv2rdf.py'),
147-
join(tmp_src, 'rdflib', 'tools', 'graphisomorphism.py'),
148-
join(tmp_src, 'rdflib', 'tools', 'rdf2dot.py'),
149-
join(tmp_src, 'rdflib', 'tools', 'rdfpipe.py'),
150-
join(tmp_src, 'rdflib', 'tools', 'rdfs2dot.py'),
151-
join(tmp_src, 'rdflib', 'util.py'),
152-
join(tmp_src, 'rdflib', 'void.py'),
153-
join(tmp_src, 'run_tests.py'),
154-
join(tmp_src, 'test', '__init__.py'),
155-
join(tmp_src, 'test', 'earl.py'),
156-
join(tmp_src, 'test', 'manifest.py'),
157-
join(tmp_src, 'test', 'rdfa', '__init__.py'),
158-
join(tmp_src, 'test', 'rdfa', 'run_w3c_rdfa_testsuite.py'),
159-
join(tmp_src, 'test', 'rdfa', 'test_non_xhtml.py'),
160-
join(tmp_src, 'test', 'store_performance.py'),
161-
join(tmp_src, 'test', 'test_aggregate_graphs.py'),
162-
join(tmp_src, 'test', 'test_bnode_ncname.py'),
163-
join(tmp_src, 'test', 'test_comparison.py'),
164-
join(tmp_src, 'test', 'test_conjunctive_graph.py'),
165-
join(tmp_src, 'test', 'test_conneg.py'),
166-
join(tmp_src, 'test', 'test_conventions.py'),
167-
join(tmp_src, 'test', 'test_core_sparqlstore.py'),
168-
join(tmp_src, 'test', 'test_dataset.py'),
169-
join(tmp_src, 'test', 'test_datetime.py'),
170-
join(tmp_src, 'test', 'test_dawg.py'),
171-
join(tmp_src, 'test', 'test_diff.py'),
172-
join(tmp_src, 'test', 'test_empty_xml_base.py'),
173-
join(tmp_src, 'test', 'test_evaluate_bind.py'),
174-
join(tmp_src, 'test', 'test_events.py'),
175-
join(tmp_src, 'test', 'test_expressions.py'),
176-
join(tmp_src, 'test', 'test_finalnewline.py'),
177-
join(tmp_src, 'test', 'test_graph.py'),
178-
join(tmp_src, 'test', 'test_graph_context.py'),
179-
join(tmp_src, 'test', 'test_graph_formula.py'),
180-
join(tmp_src, 'test', 'test_graph_items.py'),
181-
join(tmp_src, 'test', 'test_initbindings.py'),
182-
join(tmp_src, 'test', 'test_iomemory.py'),
183-
join(tmp_src, 'test', 'test_issue084.py'),
184-
join(tmp_src, 'test', 'test_issue154.py'),
185-
join(tmp_src, 'test', 'test_issue160.py'),
186-
join(tmp_src, 'test', 'test_issue161.py'),
187-
join(tmp_src, 'test', 'test_issue184.py'),
188-
join(tmp_src, 'test', 'test_issue190.py'),
189-
join(tmp_src, 'test', 'test_issue200.py'),
190-
join(tmp_src, 'test', 'test_issue209.py'),
191-
join(tmp_src, 'test', 'test_issue247.py'),
192-
join(tmp_src, 'test', 'test_issue248.py'),
193-
join(tmp_src, 'test', 'test_issue363.py'),
194-
join(tmp_src, 'test', 'test_issue375.py'),
195-
join(tmp_src, 'test', 'test_issue379.py'),
196-
join(tmp_src, 'test', 'test_issue_git_200.py'),
197-
join(tmp_src, 'test', 'test_issue_git_336.py'),
198-
join(tmp_src, 'test', 'test_literal.py'),
199-
join(tmp_src, 'test', 'test_memory_store.py'),
200-
join(tmp_src, 'test', 'test_n3.py'),
201-
join(tmp_src, 'test', 'test_n3_suite.py'),
202-
join(tmp_src, 'test', 'test_namespace.py'),
203-
join(tmp_src, 'test', 'test_nodepickler.py'),
204-
join(tmp_src, 'test', 'test_nquads.py'),
205-
join(tmp_src, 'test', 'test_nquads_w3c.py'),
206-
join(tmp_src, 'test', 'test_nt_misc.py'),
207-
join(tmp_src, 'test', 'test_nt_suite.py'),
208-
join(tmp_src, 'test', 'test_nt_w3c.py'),
209-
join(tmp_src, 'test', 'test_parser.py'),
210-
join(tmp_src, 'test', 'test_parser_helpers.py'),
211-
join(tmp_src, 'test', 'test_parser_structure.py'),
212-
join(tmp_src, 'test', 'test_path_div_future.py'),
213-
join(tmp_src, 'test', 'test_prefixTypes.py'),
214-
join(tmp_src, 'test', 'test_preflabel.py'),
215-
join(tmp_src, 'test', 'test_prettyxml.py'),
216-
join(tmp_src, 'test', 'test_rdf_lists.py'),
217-
join(tmp_src, 'test', 'test_rdfxml.py'),
218-
join(tmp_src, 'test', 'test_roundtrip.py'),
219-
join(tmp_src, 'test', 'test_rules.py'),
220-
join(tmp_src, 'test', 'test_seq.py'),
221-
join(tmp_src, 'test', 'test_serializexml.py'),
222-
join(tmp_src, 'test', 'test_slice.py'),
223-
join(tmp_src, 'test', 'test_sparql.py'),
224-
join(tmp_src, 'test', 'test_sparqlstore.py'),
225-
join(tmp_src, 'test', 'test_sparqlupdatestore.py'),
226-
join(tmp_src, 'test', 'test_swap_n3.py'),
227-
join(tmp_src, 'test', 'test_term.py'),
228-
join(tmp_src, 'test', 'test_trig.py'),
229-
join(tmp_src, 'test', 'test_trig_w3c.py'),
230-
join(tmp_src, 'test', 'test_trix_parse.py'),
231-
join(tmp_src, 'test', 'test_trix_serialize.py'),
232-
join(tmp_src, 'test', 'test_tsvresults.py'),
233-
join(tmp_src, 'test', 'test_turtle_serialize.py'),
234-
join(tmp_src, 'test', 'test_turtle_w3c.py'),
235-
join(tmp_src, 'test', 'test_util.py'),
236-
join(tmp_src, 'test', 'test_xmlliterals.py'),
237-
join(tmp_src, 'test', 'testutils.py'),
238-
join(tmp_src, 'test', 'triple_store.py'),
239-
join(tmp_src, 'test', 'type_check.py'),
240-
join(tmp_src, 'rdflib', 'extras', 'external_graph_libs.py'),
241-
join(tmp_src, 'examples', 'graph_digest_benchmark.py'),
242-
join(tmp_src, 'test', 'test_auditable.py'),
243-
join(tmp_src, 'test', 'test_canonicalization.py'),
244-
join(tmp_src, 'test', 'test_extras_external_graph_libs.py'),
245-
join(tmp_src, 'test', 'test_issue223.py'),
246-
join(tmp_src, 'test', 'test_issue381.py'),
247-
join(tmp_src, 'test', 'test_issue432.py'),
248-
join(tmp_src, 'test', 'test_issue446.py'),
249-
join(tmp_src, 'test', 'test_issue457.py'),
250-
join(tmp_src, 'test', 'test_issue492.py'),
251-
join(tmp_src, 'test', 'test_issue523.py'),
252-
join(tmp_src, 'test', 'test_issue532.py'),
253-
join(tmp_src, 'test', 'test_issue535.py'),
254-
join(tmp_src, 'test', 'test_issue545.py'),
255-
join(tmp_src, 'test', 'test_issue554.py'),
256-
join(tmp_src, 'test', 'test_issue563.py'),
257-
join(tmp_src, 'test', 'test_issue576.py'),
258-
join(tmp_src, 'test', 'test_issue579.py'),
259-
join(tmp_src, 'test', 'test_issue604.py'),
260-
join(tmp_src, 'test', 'test_issue655.py'),
261-
join(tmp_src, 'test', 'test_sparql_agg_distinct.py'),
262-
join(tmp_src, 'test', 'test_sparql_agg_undef.py'),
263-
join(tmp_src, 'test', 'test_turtle_sort_issue613.py'),
264-
join(tmp_src, 'test', 'test_wide_python.py'),
265-
]
266-
for fn in six_ed:
267-
outfiles_2to3.remove(fn)
268-
for fn in outfiles_2to3:
269-
print('running 2to3 on', fn)
270-
271-
util.run_2to3(outfiles_2to3)
2722

273-
# arrange setup to use the copy
274-
sys.path.insert(0, tmp_src)
275-
276-
return tmp_src
3+
import os
4+
from setuptools import setup, find_packages
2775

2786
kwargs = {}
279-
if sys.version_info[0] >= 3:
280-
from setuptools import setup, find_packages
281-
# kwargs['use_2to3'] = True # is done in setup_python3 above already
282-
kwargs['install_requires'] = ['isodate', 'pyparsing']
283-
kwargs['tests_require'] = ['html5lib', 'networkx']
284-
kwargs['requires'] = [
285-
'six', 'isodate', 'pyparsing',
286-
]
287-
html5lib = 'html5lib'
288-
kwargs['src_root'] = setup_python3()
289-
assert setup
290-
else:
291-
try:
292-
from setuptools import setup, find_packages
293-
assert setup
294-
kwargs['test_suite'] = "nose.collector"
295-
kwargs['install_requires'] = [
296-
'six', 'isodate',
297-
'pyparsing']
298-
kwargs['tests_require'] = ['networkx']
299-
300-
html5lib = 'html5lib'
301-
302-
except ImportError:
303-
from distutils.core import setup, find_packages
304-
html5lib = None
305-
306-
if html5lib is not None: # ie. we're not using the simplified distutils setup
307-
kwargs['extras_require'] = {'sparql': ['SPARQLWrapper'], 'html': [html5lib]}
308-
kwargs['tests_require'].append('SPARQLWrapper')
309-
kwargs['tests_require'].append(html5lib)
310-
7+
kwargs['install_requires'] = [ 'six', 'isodate', 'pyparsing']
8+
kwargs['tests_require'] = ['html5lib', 'networkx', 'SPARQLWrapper']
9+
kwargs['test_suite'] = "nose.collector"
10+
kwargs['extras_require'] = {'sparql': ['SPARQLWrapper'], 'html': ['html5lib']}
31111

312-
# Find version. We have to do this because we can't import it in Python 3 until
313-
# its been automatically converted in the setup process.
314-
def find_version(filename):
315-
_version_re = re.compile(r'__version__ = "(.*)"')
316-
for line in open(filename):
317-
version_match = _version_re.match(line)
318-
if version_match:
319-
return version_match.group(1)
32012

321-
version = find_version('rdflib/__init__.py')
13+
from rdflib import __version__ as version
32214

32315
packages = find_packages(exclude=('examples*', 'test*'))
32416

0 commit comments

Comments
 (0)