Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmmnbuild-dep-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
scripting-tools
cmmnbuild-dep-manager
Commits
3561bb25
Commit
3561bb25
authored
5 years ago
by
Philip Elson
Browse files
Options
Downloads
Patches
Plain Diff
Use setuptools_scm for automatic versioning.
parent
59489dc8
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!26
Improve setup.py and use setuptools_scm for automatic versioning.
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
cmmnbuild_dep_manager/__init__.py
+1
-3
1 addition, 3 deletions
cmmnbuild_dep_manager/__init__.py
pyproject.toml
+7
-0
7 additions, 0 deletions
pyproject.toml
setup.py
+51
-28
51 additions, 28 deletions
setup.py
with
60 additions
and
31 deletions
.gitignore
+
1
−
0
View file @
3561bb25
...
...
@@ -8,4 +8,5 @@ __pycache__
/cmmnbuild_dep_manager/modules.json
/cmmnbuild_dep_manager/jars
/cmmnbuild_dep_manager/lib
cmmnbuild_dep_manager/_version.py
*.swp
This diff is collapsed.
Click to expand it.
cmmnbuild_dep_manager/__init__.py
+
1
−
3
View file @
3561bb25
# -*- coding: utf-8 -*-
from
.cmmnbuild_dep_manager
import
Manager
from
._version
import
version
as
__version__
__version__
=
'
2.3.1
'
This diff is collapsed.
Click to expand it.
pyproject.toml
0 → 100644
+
7
−
0
View file @
3561bb25
[build-system]
requires
=
["setuptools>
=
42
", "
wheel
", "
setuptools_scm[toml]>
=
3.4
"]
# Enable automatic versioning from git.
[tool.setuptools_scm]
write_to
=
"cmmnbuild_dep_manager/_version.py"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
setup.py
+
51
−
28
View file @
3561bb25
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
setup.py for cmmnbuild-dep-manager.
import
ast
import
os
import
setuptools
For reference see
https://packaging.python.org/guides/distributing-packages-using-setuptools/
"""
from
pathlib
import
Path
from
setuptools
import
setup
,
find_packages
def
get_version_from_init
():
init_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
cmmnbuild_dep_manager
'
,
'
__init__.py
'
)
with
open
(
init_file
,
'
r
'
)
as
fd
:
for
line
in
fd
:
if
line
.
startswith
(
'
__version__
'
):
return
ast
.
literal_eval
(
line
.
split
(
'
=
'
,
1
)[
1
].
strip
())
setuptools
.
setup
(
name
=
'
cmmnbuild-dep-manager
'
,
version
=
get_version_from_init
(),
description
=
'
Manages CERN
\'
s Java dependencies across multiple Python
'
'
packages
'
,
author
=
'
CERN MD Scripting Tools Community
'
,
author_email
=
'
MD-scripting-tools@cern.ch
'
,
license
=
'
MIT
'
,
url
=
'
https://gitlab.cern.ch/scripting-tools/cmmnbuild-dep-manager
'
,
packages
=
[
'
cmmnbuild_dep_manager
'
,
'
cmmnbuild_dep_manager.resolver
'
],
install_requires
=
[
HERE
=
Path
(
__file__
).
parent
.
absolute
()
with
(
HERE
/
'
README.md
'
).
open
(
'
rt
'
)
as
fh
:
LONG_DESCRIPTION
=
fh
.
read
().
strip
()
REQUIREMENTS
:
dict
=
{
'
core
'
:
[
'
entrypoints
'
,
'
JPype1>=0.6.1
'
,
'
requests
'
,
'
six
'
'
six
'
,
],
'
test
'
:
[
'
pytest
'
,
],
}
setup
(
name
=
'
cmmnbuild-dep-manager
'
,
description
=
"
Manages CERN
'
s Java dependencies across multiple Python
"
"
packages
"
,
maintainer
=
'
CERN Accelerating Python
'
,
maintainer_email
=
'
acc-py-support@cern.ch
'
,
long_description
=
LONG_DESCRIPTION
,
long_description_content_type
=
'
text/markdown
'
,
license
=
'
MIT
'
,
url
=
'
https://gitlab.cern.ch/scripting-tools/cmmnbuild-dep-manager
'
,
packages
=
find_packages
(),
python_requires
=
'
>=3.6, <4
'
,
classifiers
=
[
"
Programming Language :: Python :: 3
"
,
"
Operating System :: OS Independent
"
,
],
install_requires
=
REQUIREMENTS
[
'
core
'
],
extras_require
=
{
**
REQUIREMENTS
,
# The 'dev' extra is the union of 'test' and 'doc', with an option
# to have explicit development dependencies listed.
'
dev
'
:
[
req
for
extra
in
[
'
dev
'
,
'
test
'
,
'
doc
'
]
for
req
in
REQUIREMENTS
.
get
(
extra
,
[])],
# The 'all' extra is the union of all requirements.
'
all
'
:
[
req
for
reqs
in
REQUIREMENTS
.
values
()
for
req
in
reqs
],
},
package_data
=
{
'
cmmnbuild_dep_manager.resolver
'
:
[
'
gradle-wrapper.zip
'
]},
include_package_data
=
True
,
# cmmnbuild-dep-manager puts special files in the package directory, so it
# cannot be installed as a zip.
zip_safe
=
False
)
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