Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chkcrontab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
chkcrontab
Commits
4fd78db1
Commit
4fd78db1
authored
Jul 25, 2016
by
Gregory Duchatelet
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'pmclanahan/fix-install-python-26'
parents
a5607365
1a036be6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.py
+12
-4
12 additions, 4 deletions
setup.py
with
12 additions
and
4 deletions
setup.py
+
12
−
4
View file @
4fd78db1
...
...
@@ -25,10 +25,7 @@ from distutils import log
from
distutils.command.install
import
install
from
distutils.core
import
setup
from
distutils.core
import
Command
if
sys
.
version_info
<
(
2
,
7
):
import
unittest2
as
unittest
else
:
import
unittest
BASE_DIR
=
os
.
path
.
dirname
(
globals
().
get
(
'
__file__
'
,
os
.
getcwd
()))
...
...
@@ -44,6 +41,14 @@ class TestCmd(Command):
pass
def
run
(
self
):
if
sys
.
version_info
<
(
2
,
7
):
try
:
import
unittest2
as
unittest
except
ImportError
:
raise
RuntimeError
(
'
unittest2 required for running tests under Python < 2.7.
'
)
else
:
import
unittest
test_dir
=
os
.
path
.
join
(
BASE_DIR
,
'
tests
'
)
tests
=
unittest
.
TestLoader
().
discover
(
test_dir
)
...
...
@@ -52,6 +57,7 @@ class TestCmd(Command):
if
not
result
.
wasSuccessful
():
sys
.
exit
(
1
)
class
CleanCmd
(
Command
):
description
=
'
Remove all generated files.
'
user_options
=
[]
...
...
@@ -153,6 +159,7 @@ class InstallCmd(install):
os
.
path
.
join
(
manpage_dir
,
manpage_file
),
dry_run
=
self
.
dry_run
)
# Only override install if not being run by setuptools.
cmdclass
=
{
'
test
'
:
TestCmd
,
'
dist_clean
'
:
CleanCmd
,
...
...
@@ -160,6 +167,7 @@ cmdclass = {'test': TestCmd,
if
'
setuptools
'
not
in
dir
():
cmdclass
[
'
install
'
]
=
InstallCmd
setup
(
cmdclass
=
cmdclass
,
name
=
'
chkcrontab
'
,
...
...
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