Commit Graph

379 Commits

Author SHA1 Message Date
twangboy
eb3d45bb08
Remove installation of pywin32 from setup.py
This keeps regressing for some reason. This is the 3rd time I've had to
fix this... I believe
2018-04-20 15:05:51 -06:00
rallytime
fe2d46dd0c
Better merge conflict resolution for setup.py windows changes 2018-03-16 12:38:29 -04:00
rallytime
8d1e1e7f94
Merge branch '2017.7' into '2018.3'
Conflicts:
  - .kitchen.yml
  - Gemfile
  - pkg/windows/build_env_2.ps1
  - pkg/windows/build_env_3.ps1
  - pkg/windows/req.txt
  - salt/client/ssh/__init__.py
  - salt/client/ssh/ssh_py_shim.py
  - salt/modules/boto_vpc.py
  - salt/modules/file.py
  - salt/modules/heat.py
  - salt/modules/smartos_vmadm.py
  - salt/modules/win_dsc.py
  - salt/returners/elasticsearch_return.py
  - salt/runners/salt.py
  - salt/states/module.py
  - salt/utils/win_functions.py
  - setup.py
  - tests/integration/modules/test_state.py
  - tests/unit/grains/test_core.py
  - tests/unit/test_pillar.py
2018-03-15 17:22:05 -04:00
twangboy
bcf8b19566
Update the installer build
Fixes some issues with Py3 not building
Brings the 2 build_env files more in line with each other
Fixes some typos in the build_env scripts
Removes the need for seperate req files for Py2 and Py3
Setup.py uses the windows req file on Windows
Removes the need to install pycrypto and pyyaml in setup.py. They are
now handled in the req.txt
Uses pypi resources instead of downloading .whl files and .exes for
dependencies
Updates nssm version to address the issue in #46192
Removes nssm from buildenv and downloads 32 and 64 bit versions of nssm
in build_pkg.bat
Removes the AppNoConsole=1 setting from the nsis script since it is not
needed with the new version of nssm
2018-03-02 13:04:48 -07:00
Erik Johnson
160dcc4ca0
Appease pylint 2018-02-14 14:52:22 -06:00
Erik Johnson
61b90bc4bf
setup.py: Work around bad code in distutils
While running an sdist, distutils logs when it creates paths. However,
if the paths are unicode _and_ contain unicode code points, the log
message results in a `UnicodeEncodeError` as distutils attempts to
perform string replacement using a str format string and a unicode path.

Paths recently added in the test suite's files to test unicode
compatibility have caused this issue to surface.

This fixes the resulting traceback by ensuring that Python 2 only passes
utf-8 encoded bytestrings when making the release tree.
2018-02-14 11:43:06 -06:00
Daniel Wallace
8ebf937b21
decode file list for setup.py on python2 2018-02-01 11:51:59 -07:00
twangboy
c933f46c6a
Add check for pypiwin32 also 2018-01-03 14:33:06 -07:00
twangboy
15317951fc
Update setup.py for new windows install
setup.py
- Remove PyCrypto install, that happens through req.txt
- Remove PyYAML install, that happens through req.txt
- Add PyWin32 install, that happens with downloaded .whl
- Detect if PyWin32 is already installed before installing

build_env_#.py
- Put PyWin32 dlls in Python root instead of site-packages\win32
- hide gen_py directory creation message
2018-01-03 14:28:36 -07:00
twangboy
1ba89026b2
Consolidate req file 2017-12-06 08:35:31 -07:00
rallytime
c0f16dae74
Merge branch '2017.7' into 'develop'
Conflicts:
  - doc/topics/tutorials/index.rst
  - salt/crypt.py
  - salt/modules/cmdmod.py
  - salt/modules/grains.py
  - salt/pillar/git_pillar.py
  - salt/roster/clustershell.py
  - tests/unit/states/test_augeas.py
  - tests/unit/utils/test_utils.py
2017-10-16 15:26:19 -04:00
rallytime
1d4a6c3949
Lint: Fixup undefined variable errors 2017-10-11 09:25:41 -04:00
rallytime
788ad0609a
Merge branch '2016.11' into '2017.7'
No conflicts.
2017-10-10 16:34:52 -04:00
Pablo Suárez Hernández
44bc91bb98
Enable '--with-salt-version' parameter for setup.py script 2017-10-06 17:12:15 +01:00
Gareth J. Greenaway
2cdd775ca8 Adding back in the salt-spm-reactor-dir 2017-09-15 08:40:38 -07:00
Gareth J. Greenaway
fadcc61618 Adding home_dir to SaltDistribution.global_options. 2017-09-14 18:34:32 -07:00
Gareth J. Greenaway
c70df4adcd Following the change in #42103 if Salt is installed via setup.py then the generated _syspaths.py does not contain the HOME_DIR which results in a failure. 2017-09-14 16:18:45 -07:00
Michael Calmer
0c6611f274 do not generate a date in a comment to prevent rebuilds (bsc#969407) 2017-06-16 14:37:45 +02:00
rallytime
9ff2694155 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - pkg/salt-minion.service
  - salt/modules/junos.py
  - salt/modules/localemod.py
  - salt/modules/win_system.py
  - salt/states/junos.py
  - tests/unit/modules/test_localemod.py
  - tests/unit/modules/test_win_powercfg.py
  - tests/unit/states/dockerng_test.py
2017-05-24 16:32:59 -06:00
Benjamin Drung
33a7f8b2ec Fix typos
lintian found several spelling errors.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2017-05-24 12:50:29 +02:00
twangboy
c03f8d39d2 Use req_2.txt for Py2 2017-04-27 09:51:32 -06:00
twangboy
57d5f781f4 Use req files in pkg\windows for setup 2017-04-27 09:47:46 -06:00
Pedro Algarvio
281e0cafb2
Fix resource leakage 2017-04-05 23:18:00 +01:00
twangboy
984ee934a7 Merge branch 'develop' of https://github.com/saltstack/salt into develop 2017-03-10 21:53:07 +00:00
twangboy
02757db1e4 Add python 3 installer for Windows 2017-03-10 21:52:38 +00:00
Pedro Algarvio
0de35b51cc
Lint and syntax fixes 2017-03-09 19:29:15 +00:00
Joseph Hall
829f7008f1 Fill in a couple more spots 2017-03-02 05:27:20 -07:00
Joseph Hall
7ebf1cf104 Fix paths from SPM files PR 2017-03-02 05:17:42 -07:00
rallytime
609e6e4b23 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/config/__init__.py
  - salt/modules/win_lgpo.py
  - salt/utils/aws.py
  - tests/unit/utils/schema_test.py
2017-02-09 10:29:40 -07:00
Morgan Willcock
d7e05091a2 Remove global options from Install 2017-02-04 19:00:36 +00:00
markuskramerIgitt
5375bf5cb4 Option to compile the Salt-Minion installer offline 2017-01-27 22:55:41 +01:00
markuskramerIgitt
b4aa2ffaab Option to compile the Salt-Minion installer offline 2017-01-27 22:52:21 +01:00
Mike Place
4956d7d5a3
Merge branch '2016.3' into 2016_3_develop 2016-09-26 21:47:32 +09:00
rallytime
d5bbd91c14 Merge branch '2016.3' into 'carbon'
Conflicts:
  - conf/master
2016-09-23 17:01:17 -06:00
rallytime
52cf40db8c Merge branch '2015.8' into '2016.3'
No conflicts.
2016-09-23 08:32:47 -06:00
rallytime
7bcbf8dc36 Merge branch '2016.3' into 'carbon'
Conflicts:
  - doc/faq.rst
  - salt/modules/win_service.py
2016-09-20 10:43:55 -06:00
twangboy
fc4a03a75d Check for existing library on Windows 2016-09-20 09:31:13 -06:00
rallytime
c64e489f6f Merge branch '2015.8' into '2016.3'
No conflicts.
2016-09-19 11:22:54 -06:00
twangboy
a817aef1c2 Add windows requirements file 2016-09-16 15:43:36 -06:00
rallytime
95dbe1ade4 Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/fileserver/__init__.py
  - setup.py
  - tests/integration/modules/git.py
2016-09-14 09:15:29 -06:00
rallytime
f603757b55 Merge branch '2015.8' into '2016.3'
Conflicts:
  - tests/unit/modules/mount_test.py
  - tests/unit/states/file_test.py
2016-09-13 08:21:48 -06:00
twangboy
dc1988add5 fix download when requests not present 2016-09-07 09:59:51 -06:00
twangboy
b4479bff5f Add additional required dll's 2016-09-06 17:36:38 -06:00
Jacob Hammons
a028796eff copy spm.1 man page during setup
Refs #25213
2016-07-20 12:21:08 -06:00
Sergey Kizunov
49f89250d3 PY3 support for Windows master/minion using TCP transport
This allows masters and minions to run on Windows using Python 3. Tested
with Python 3.5.1 64-bit on Windows 7. Only the TCP transport has been
ported. It will likely not work with other transports such as ZeroMQ or
RAET without further work.

Since there were many changes necessary to make this work, here is a list
of common changes:
- Python 3 distinguishes `bytes` from `str`. In some cases `bytes` must be
used (eg read/write to binary file). In other cases `str` must be used
(eg general Salt dictionary look-ups, read/write to text file). Due to
this, there are a lot of extra uses of `salt.utils.to_bytes` in necessary
locations.
- Use `six.itervalues(varname)` instead of `varname.itervalues()`.
- In Python 2.6 and 2.7, the 'b' prefix is ignored. So instead of

```
if six.PY2:
    some_var = 'some_value'
else:
    some_var = b'some_value'
```

we choose to simply use:

```
some_var = b'some_value'

```

`salt/engine/__init__.py`:
- In Python 3, `engine.items()` will return an iterator instead of
a list. Due to this, needed to change `engine.items()[0]` to
`list(engine.items())[0]`.

`salt/minion.py`:
- `contextlib.nested` no longer supported in Python 3. Use
`contextlib.ExitStack` in this case.
- In `Minion.handle_event`, in PY3, `package` is of type `bytes` and `tag`
is of type `str`. Due to this, do all string searches via `tag` instead
of `package` since you can't search for a `str` in a `bytes` object.

`salt/payload.py`:
- Added `encoding` parameter to `Serial.loads`. See description in comments
for details.
- Added `use_bin_type` parameter to `Serial.dumps`. See description in
comments for details.
- When reading / writing local files, encode using `use_bin_type=True` and
decode using `encoding='utf-8'` to distinguish `bytes` and `str` types.

`salt/transport/frame.py`:
- Added `frame_msg_ipc`. This is used for IPC communications where it is
safe to break the wire protocol and so we encode using `use_bin_type=True`.
- Added `decode_embedded_strs`. This is used when it is not safe to break
the wire protocol (eg external communications). This will convert `bytes`
objects to `str` objects if possible. This will search for such objects
within dicts and lists.

`salt/transport/ipc.py`:
- Use `salt.transport.frame.frame_msg_ipc` to encode using
`use_bin_type=True`.
- Use `encoding='utf-8'` to decode such messages and ensure proper
distinction of `bytes` and `str` types.

`salt/transport/tpc.py`:
- Since we need to preserve the wire protocol, we don't use
`use_bin_type=True`. When decoding, we use `decode_embedded_strs` to
convert the embedded `bytes` objects that can be converted to `str`.
- `urlparse` doesn't exist in PY3. Use `urllib.parse` instead.
- `sys.maxint` not supported in PY3. Use `int((1 << 31) - 1)` instead.
Hence `sys.maxint - 1` becomes `int((1 << 31) - 2)`.

`salt/utils/__init__.py`:
- `libc = ctypes.cdll.LoadLibrary(ctypes.util.find_library("c"))` returns
`TypeError` in PY3. This is because `ctypes.util.find_library("c")`
returns `None` and in PY3 `ctypes.cdll.LoadLibrary(None)` is a
`TypeError`.
- On Windows, `salt.utils.fopen` would always read and write files in
binary mode. This has been changed for Python 3 since `bytes` must be
used for binary mode and `str` must be used for text mode and forcing
binary mode would screw things up if you want to read/write to `str`
objects. Preserved original behavior on PY2.
- For `salt.utils.fopen`, when reading and writing text files in PY3, if
an encoding is not specified, it will choose 'utf-8'.

`salt/utils/args.py`:
- In Python 3.5, every time `inspect.getargsspec` is used, a warning would
appear announcing its deprecation (it will be removed entirely in Python
3.6). Due to this, implemented our own version using
`inspect.getfullargspec`.

`salt/utils/event.py`:
- Since all functionality here is used only in IPC (the mechanism for
firing an event from minion to master is outside this file), we can break
the wire protocol and hence encode using `use_bin_type=True` and decode
using `encoding='utf-8'`.

`salt/utils/vt.py`:
- `_subprocess` is not available in PY3 under Windows, so we use an
alternate method to invoke `TerminateProcess` and `GetExitCodeProcess`.

`setup.py`:
- In PY3, `req.read(4096)` returns a `bytes` object. If you try to for
loop through it, each element is an `int` which represents an individual
byte. Trying to write an `int` to `wfh.write` raises an exception. Due to
this, use an alternate approach when writing from a
`http.client.HTTPResponse` object to file in PY3.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2016-04-04 13:35:50 -05:00
rallytime
73d73e80c1 Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/topics/releases/2015.8.4.rst
  - doc/topics/releases/2015.8.5.rst
  - doc/topics/thorium/index.rst
  - salt/cloud/clouds/opennebula.py
  - salt/engines/thorium.py
  - salt/loader.py
  - salt/modules/archive.py
  - salt/modules/boto_vpc.py
  - salt/modules/data.py
  - salt/modules/reg.py
  - salt/pillar/mysql.py
  - salt/runners/cache.py
  - salt/states/archive.py
  - salt/states/cron.py
  - salt/states/file.py
  - salt/states/glance.py
  - salt/states/reg.py
  - salt/thorium/__init__.py
  - salt/thorium/check.py
  - salt/thorium/file.py
  - salt/thorium/reg.py
  - salt/utils/jid.py
  - salt/utils/parsers.py
  - setup.py
2016-02-12 14:38:50 -07:00
Colton Myers
076b49a4ca Merge remote-tracking branch 'upstream/2015.8' into merge-forward-2016.3
Conflicts:
    README.rst
    doc/conf.py
    doc/ref/index.rst
    doc/ref/proxy/all/salt.proxy.ssh_sample.rst
    doc/topics/installation/rhel.rst
    doc/topics/releases/2015.8.4.rst
    doc/topics/tutorials/states_pt5.rst
    salt/cloud/clouds/ec2.py
    salt/cloud/clouds/opennebula.py
    salt/config/__init__.py
    salt/modules/boto_dynamodb.py
    salt/modules/boto_ec2.py
    salt/modules/boto_elasticache.py
    salt/modules/boto_elb.py
    salt/modules/boto_iam.py
    salt/modules/boto_rds.py
    salt/modules/boto_sns.py
    salt/modules/boto_sqs.py
    salt/modules/dracr.py
    salt/modules/git.py
    salt/modules/mine.py
    salt/modules/systemd.py
    salt/modules/win_pkg.py
    salt/modules/yumpkg.py
    salt/pillar/__init__.py
    salt/states/git.py
    salt/states/rabbitmq_vhost.py
    salt/states/saltmod.py
    salt/utils/pkg/rpm.py
    setup.py
    tests/unit/modules/systemd_test.py
    tests/unit/states/rabbitmq_vhost_test.py
2016-02-11 22:33:49 -07:00
rallytime
742d0a6b04 Change all relevant Boron references to 2016.3.0
And more Boron deprecation warnings to Carbon
2016-02-10 15:45:28 -07:00
Justin Findlay
ae10c71b6b setup.py: remove Boron deprecated code 2016-02-10 11:33:41 -07:00
Justin Findlay
7bfb28c5db Revert "setup.py: remove Boron deprecated code" 2016-02-10 11:27:08 -07:00