Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
zesje
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Réouven ASSOULY
zesje
Commits
c7e5d674
Commit
c7e5d674
authored
7 years ago
by
Joseph Weston
Browse files
Options
Downloads
Patches
Plain Diff
correctly add static data to source distribution
parent
9ade2600
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MANIFEST.in
+1
-0
1 addition, 0 deletions
MANIFEST.in
setup.py
+13
-18
13 additions, 18 deletions
setup.py
with
14 additions
and
18 deletions
MANIFEST.in
0 → 100644
+
1
−
0
View file @
c7e5d674
include-recursive zesje/static/*
This diff is collapsed.
Click to expand it.
setup.py
100644 → 100755
+
13
−
18
View file @
c7e5d674
from
setuptools
import
setup
,
find_packages
from
distutils.command.build
import
build
from
setuptools.command.sdist
import
sdist
def
webpack
():
import
subprocess
subprocess
.
check_call
([
'
yarn
'
,
'
install
'
])
subprocess
.
check_call
([
'
yarn
'
,
'
build
'
])
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import
sys
from
setuptools
import
setup
,
find_packages
from
setuptools.command.sdist
import
sdist
as
sdist_orig
class
Build
(
build
):
def
run
(
self
):
webpack
()
super
().
run
()
if
sys
.
version_info
<
(
3
,
6
):
print
(
'
zesje requires Python 3.6 or higher
'
)
sys
.
exit
(
1
)
class
S
dist
(
sdist
):
class
s
dist
(
sdist
_orig
):
def
run
(
self
):
webpack
()
import
subprocess
subprocess
.
check_call
([
'
yarn
'
,
'
install
'
])
subprocess
.
check_call
([
'
yarn
'
,
'
build
'
])
super
().
run
()
...
...
@@ -29,9 +26,7 @@ setup(
author
=
"
Zesje authors
"
,
author_email
=
"
anton.akhmerov@tudelft.nl
"
,
packages
=
find_packages
(
'
.
'
),
cmdclass
=
{
'
build
'
:
Build
,
'
sdist
'
:
Sdist
,
},
cmdclass
=
dict
(
sdist
=
sdist
),
package_data
=
{
'
zesje
'
:
[
'
static/*
'
]},
include_package_data
=
True
,
)
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